Swedish Keyboard - Svenskt Tangentbord

Click or type it... Copy it... And paste it... Done!


This Swedish Keyboard enables you to easily type Swedish online without installing Swedish keyboard. You can use your computer keyboard or mouse to type Swedish letters with this online keyboard.

Pressing Esc on the Swedish keyboard layout will toggle the mouse input between virtual QWERTY keyboard and virtual Swedish keyboard. The key will also turn on/off your keyboard input conversion. Pressing Esc on your keyboard has the same function.

Press Shift or either Ctrl + Alt or AltGr for additional Swedish letters that are not visible on the keyboard. To type accented letters, press the diacritical mark first. You may find additional accented letters by pressing Shift.

For mobile phones and tablets, touch and hold inside the text area to copy the text. You can then paste the text in any app such as Facebook, Twitter, email, or search app.

This site uses cookies and other tracking technologies to assist with your ability to provide feedback, analyze your use of our products and services, and provide content from third parties. Cookie Policy
(function(){var a={};a.util={mobile:/Android|webOS|iPhone|iPad|iPod|IEMobile|Opera Mini/i.test(navigator.userAgent),opera:((!!window.opr&&!!opr.addons)||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0),mozilla:(typeof InstallTrigger!=="undefined"),windowWidth:function(){var i=window.document.documentElement.clientWidth,e=window.document.body;return window.document.compatMode==="CSS1Compat"&&i||e&&e.clientWidth||i},code:function(i){if(!i){var i=window.event}if(i.code!=undefined&&i.key!=undefined){return i.code}return"Unidentified"},keyCode:function(t){if(!t){var t=window.event}var i=t.keyCode;if(this.mozilla){switch(i){case 59:i=186;break;case 107:i=187;break;case 109:i=189;break;case 61:i=187;break;case 173:i=189;break}}if(this.opera){switch(i){case 59:i=186;break;case 61:i=187;break;case 109:i=189;break}}if(i==18&&t.location&&t.location==2){i=255}return i},preventDefault:function(i){if(!i){var i=window.event}i.preventDefault?i.preventDefault():(i.returnValue=false)},srcId:function(i,t,v){if(!i){var i=window.event}var u;if(i.target){u=i.target}else{if(i.srcElement){u=i.srcElement}}if(u.nodeType==3){u=target.parentNode}while(u.tagName.toLowerCase()!=v){u=u.parentNode;if(u==t||u.tagName.toLowerCase()=="body"){return null}}return u.id},insertAtCaret:function(i,w){var v=this.getSelectionStart(i);var t=this.getSelectionEnd(i);var u=i.value.length;i.value=i.value.substring(0,v)+w+i.value.substring(t,u);this.setCaretPosition(i,v+w.length,0)},deleteAtCaret:function(u,t,i){var x=this.getSelectionStart(u);var v=this.getSelectionEnd(u);var w=u.value.length;if(t>x){t=x}if(v+i>w){i=w-v}var y=u.value.substring(x-t,v+i);u.value=u.value.substring(0,x-t)+u.value.substring(v+i);this.setCaretPosition(u,x-t,0);return y},getSelectionStart:function(i){i.focus();if(i.selectionStart!==undefined){return i.selectionStart}else{if(document.selection){var t=document.selection.createRange();if(t==null){return 0}var v=i.createTextRange();var u=v.duplicate();v.moveToBookmark(t.getBookmark());u.setEndPoint("EndToStart",v);return u.text.length}}return 0},getSelectionEnd:function(i){i.focus();if(i.selectionEnd!==undefined){return i.selectionEnd}else{if(document.selection){var t=document.selection.createRange();if(t==null){return 0}var v=i.createTextRange();var u=v.duplicate();v.moveToBookmark(t.getBookmark());u.setEndPoint("EndToStart",v);return u.text.length+t.text.length}}return i.value.length},setCaretPosition:function(t,v,i){var u=t.value.length;if(v>u){v=u}if(v+i>u){i=u-i}t.focus();if(t.setSelectionRange){t.setSelectionRange(v,v+i)}else{if(t.createTextRange){var w=t.createTextRange();w.collapse(true);w.moveEnd("character",v+i);w.moveStart("character",v);w.select()}}t.focus()},selectAll:function(i){this.setCaretPosition(i,0,i.value.length)},fromCharCodeS:function(){var v=arguments.length;var w="";var e,u,x;for(var t=0;t"},{i:"k46",c:"0",n:"/",s:"?"},{i:"k47",c:"0",n:"\\",s:"|"}];this.deadkeys=[];this.dir="ltr";this.name="US";this.lang="en"};a.layout.prototype.load=function(e){this.keys=e.keys;this.deadkeys=e.deadkeys;this.dir=e.dir;this.name=e.name;this.lang=e.lang?e.lang:"en"};a.layout.parser={keys:{"192":"Backquote","49":"Digit1","50":"Digit2","51":"Digit3","52":"Digit4","53":"Digit5","54":"Digit6","55":"Digit7","56":"Digit8","57":"Digit9","48":"Digit0","189":"Minus","187":"Equal","81":"KeyQ","87":"KeyW","69":"KeyE","82":"KeyR","84":"KeyT","89":"KeyY","85":"KeyU","73":"KeyI","79":"KeyO","80":"KeyP","219":"BracketLeft","221":"BracketRight","220":"Backslash","65":"KeyA","83":"KeyS","68":"KeyD","70":"KeyF","71":"KeyG","72":"KeyH","74":"KeyJ","75":"KeyK","76":"KeyL","186":"Semicolon","222":"Quote","90":"KeyZ","88":"KeyX","67":"KeyC","86":"KeyV","66":"KeyB","78":"KeyN","77":"KeyM","188":"Comma","190":"Period","191":"Slash","17":"ControlLeft","18":"AltLeft","16":"ShiftLeft","32":"Space","27":"Escape","20":"CapsLock","13":"Enter","255":"AltRight"},codes:{Backquote:0,Digit1:1,Digit2:2,Digit3:3,Digit4:4,Digit5:5,Digit6:6,Digit7:7,Digit8:8,Digit9:9,Digit0:10,Minus:11,Equal:12,KeyQ:13,KeyW:14,KeyE:15,KeyR:16,KeyT:17,KeyY:18,KeyU:19,KeyI:20,KeyO:21,KeyP:22,BracketLeft:23,BracketRight:24,Backslash:25,KeyA:26,KeyS:27,KeyD:28,KeyF:29,KeyG:30,KeyH:31,KeyJ:32,KeyK:33,KeyL:34,Semicolon:35,Quote:36,KeyZ:37,KeyX:38,KeyC:39,KeyV:40,KeyB:41,KeyN:42,KeyM:43,Comma:44,Period:45,Slash:46,IntlBackslash:47},getKeyLegend:function(u,t){var v=u.length;for(var e=0;e'];u.push('
');if(a.util.windowWidth()<640){for(var t=13;t<23;t++){u.push('')}for(var t=26;t<35;t++){u.push('')}for(var t=37;t<44;t++){u.push('')}u.push('');u.push('');u.push('');u.push('');u.push('');u.push('');u.push('');u.push('');u.push('');u.push('');u.push('');u.push('');for(var t=0;t<13;t++){u.push('')}for(var t=23;t<26;t++){u.push('')}for(var t=35;t<37;t++){u.push('')}for(var t=44;t<48;t++){u.push('')}u.push('
')}else{for(var t=0;t<13;t++){u.push('')}u.push('');u.push('
');u.push('');for(var t=13;t<25;t++){u.push('')}u.push('');u.push('
');u.push('');for(var t=26;t<37;t++){u.push('')}u.push('');u.push('
');u.push('');u.push('');for(var t=37;t<47;t++){u.push('')}u.push('');u.push('
');u.push('');u.push('');u.push('');u.push('');u.push('');u.push('');u.push('');u.push('
')}u.push("
");u.push('");u.push("
");document.getElementById(e).innerHTML=u.join("");this.wireEvents();this.drawKeyboard()};a.keyboard.prototype.loadDefaultLayout=function(e){this.defaultLayout.load(e);this.drawKeyboard()};a.keyboard.prototype.loadVirtualLayout=function(e){this.virtualLayout.load(e);this.drawKeyboard();this.textbox.style.direction=this.attr("dir")};a.keyboard.prototype.switchLayout=function(){this.currentLayout=(this.currentLayout===this.defaultLayout)?this.virtualLayout:this.defaultLayout;this.reset();this.drawKeyboard();this.textbox.style.direction=this.attr("dir")};a.keyboard.prototype.getFontSize=function(){return this.fontSize};a.keyboard.prototype.setFontSize=function(e){this.fontSize=e;this.textbox.style.fontSize=this.fontSize+"px"};a.keyboard.prototype.onEsc=function(){this.switchLayout();this.customOnEsc()};a.keyboard.prototype.onShift=function(){this.shift=!this.shift;this.drawKeyboard()};a.keyboard.prototype.onAlt=function(){this.alt=!this.alt;this.drawKeyboard()};a.keyboard.prototype.onAltGr=function(){this.altGr=!this.altGr;this.drawKeyboard()};a.keyboard.prototype.onCtrl=function(){this.ctrl=!this.ctrl;this.drawKeyboard()};a.keyboard.prototype.onCapsLock=function(){this.caps=!this.caps;this.drawKeyboard()};a.keyboard.prototype.onBackspace=function(){if(this.prev!=""){this.prev="";this.shift=false;this.drawKeyboard()}else{var i=a.util.deleteAtCaret(this.textbox,1,0);if(i.length>0){var e=i.charCodeAt(0);if(e<57344&&56319
',a.util.fromCharCodeS(this.emojiCurrentCodePoint+e-100),"
");var t=e-99;if(t==u){v.push('');v.push('
')}else{if(t==2*u){v.push('');v.push('
')}else{if(t==3*u){v.push('');v.push('
')}else{if(t==4*u){v.push('');v.push('
')}else{if(t==5*u){v.push('');v.push('
')}}}}}}v.push('
');return v.join("")};a.keyboard.prototype.drawKeyboard=function(){if(this.emoji){document.getElementById("zeopic-keyboard-emoji").innerHTML=this.getEmojiHTML();document.getElementById("zeopic-keyboard-emoji").style.display="";document.getElementById("zeopic-keyboard-alpha").style.display="none";return}else{document.getElementById("zeopic-keyboard-emoji").style.display="none";document.getElementById("zeopic-keyboard-alpha").style.display=""}if(!this.currentLayout.keys){return}var E,G,J,K;var H=this.currentLayout.keys.length;for(var F=0;F',a.layout.parser.getKeyLegend(this.defaultLayout.keys,G.i),"");if(!I){K=this.customDrawKeyboard(K);if(K==""){K=" "}E.push('
 ',K,"
")}else{if(K==""){K=" "}E.push('
 ',K,"
")}document.getElementById("zeopic-"+G.i).innerHTML=E.join("")}var x=document.getElementById("zeopic-left-ctrl");var A=document.getElementById("zeopic-right-ctrl");if(x&&A){if(D){x.className="zeopic-recessed"+(this.ctrl?"":"-hover");A.className="zeopic-recessed"+(this.ctrl?"":"-hover")}else{x.className="";A.className=""}}var w=document.getElementById("zeopic-left-alt");if(w){if(e){w.className="zeopic-recessed"+(this.alt?"":"-hover")}else{w.className=""}}var z=document.getElementById("zeopic-right-alt");if(z){if(t){z.className="zeopic-recessed"+(this.altGr?"":"-hover")}else{z.className=""}}var y=document.getElementById("zeopic-left-shift");var B=document.getElementById("zeopic-right-shift");if(y&&B){if(I){y.className="zeopic-recessed"+(this.shift?"":"-hover");B.className="zeopic-recessed"+(this.shift?"":"-hover")}else{y.className="";B.className=""}}var u=document.getElementById("zeopic-caps-lock");if(u){if(C){u.className="zeopic-recessed"+(this.caps?"":"-hover")}else{u.className=""}}var v=document.getElementById("zeopic-escape");if(v){if(this.currentLayout===this.defaultLayout){v.className="zeopic-recessed"}else{v.className=""}}};a.keyboard.prototype.wireEvents=function(){var e=this;document.getElementById("zeopic-keyboard").onmousedown=function(i){var t=a.util.srcId(i,this,"button");if(!t){return}e.interval=setInterval(function(){e.counter++;if(e.counter>5){switch(t){case"zeopic-backspace":case"zeopic-emoji-backspace":e.onBackspace();break;case"zeopic-enter":case"zeopic-emoji-enter":e.onEnter();break;case"zeopic-emoji-scrollup":e.onEmojiScrollUp();break;case"zeopic-emoji-scrolldown":e.onEmojiScrollDown();break;default:if(t.search("^zeopic-k([0-9]|[1-3][0-9]|4[0-7])$")!=-1){e.onKey(t.substr(7));e.shift=false;e.alt=false;e.ctrl=false;e.altGr=false;e.drawKeyboard()}else{if(t.search("^zeopic-k1[0-6][0-9]$")!=-1){e.onEmojiKey(t.substr(8))}}break}}},50)};document.getElementById("zeopic-keyboard").onmouseup=function(i){e.stopRepeat()};document.getElementById("zeopic-keyboard").onmouseout=function(i){e.stopRepeat()};document.getElementById("zeopic-keyboard").onclick=function(i){var t=a.util.srcId(i,this,"button");if(!t){return}switch(t){case"zeopic-left-shift":case"zeopic-right-shift":e.onShift();break;case"zeopic-left-alt":e.onCtrl();e.onAlt();break;case"zeopic-right-alt":e.onAltGr();break;case"zeopic-left-ctrl":case"zeopic-right-ctrl":e.onAlt();e.onCtrl();break;case"zeopic-escape":e.onEsc();break;case"zeopic-caps-lock":e.onCapsLock();break;case"zeopic-backspace":case"zeopic-emoji-backspace":e.onBackspace();break;case"zeopic-enter":case"zeopic-emoji-enter":e.onEnter();break;case"zeopic-space":e.onSpace();break;case"zeopic":case"zeopic-emoji":e.onEmoji();break;case"zeopic-emoji-scrollup":e.onEmojiScrollUp();break;case"zeopic-emoji-scrolldown":e.onEmojiScrollDown();break;default:if(t.search("^zeopic-k([0-9]|[1-3][0-9]|4[0-7])$")!=-1){e.onKey(t.substr(7));e.shift=false;e.alt=false;e.ctrl=false;e.altGr=false;e.drawKeyboard()}else{if(t.search("^zeopic-k1[0-6][0-9]$")!=-1){e.onEmojiKey(t.substr(8))}}break}};if(!("ontouchstart" in document.documentElement)||!a.util.mobile){document.getElementById("zeopic-left-shift").onmouseover=function(i){e.shiftOn=true;e.drawKeyboard()};document.getElementById("zeopic-right-shift").onmouseover=function(i){e.shiftOn=true;e.drawKeyboard()};document.getElementById("zeopic-left-shift").onmouseout=function(i){e.shiftOn=false;e.drawKeyboard()};document.getElementById("zeopic-right-shift").onmouseout=function(i){e.shiftOn=false;e.drawKeyboard()};document.getElementById("zeopic-left-ctrl").onmouseover=function(i){e.altCtrlOn=true;e.drawKeyboard()};document.getElementById("zeopic-right-ctrl").onmouseover=function(i){e.altCtrlOn=true;e.drawKeyboard()};document.getElementById("zeopic-left-ctrl").onmouseout=function(i){e.altCtrlOn=false;e.drawKeyboard()};document.getElementById("zeopic-right-ctrl").onmouseout=function(i){e.altCtrlOn=false;e.drawKeyboard()};document.getElementById("zeopic-left-alt").onmouseover=function(i){e.altCtrlOn=true;e.drawKeyboard()};document.getElementById("zeopic-right-alt").onmouseover=function(i){e.altGrOn=true;e.drawKeyboard()};document.getElementById("zeopic-left-alt").onmouseout=function(i){e.altCtrlOn=false;e.drawKeyboard()};document.getElementById("zeopic-right-alt").onmouseout=function(i){e.altGrOn=false;e.drawKeyboard()};document.getElementById("zeopic-caps-lock").onmouseover=function(i){e.capsOn=true;e.drawKeyboard()};document.getElementById("zeopic-caps-lock").onmouseout=function(i){e.capsOn=false;e.drawKeyboard()}}e.textbox.onkeydown=function(t){var i=a.util.code(t);if(i=="Unidentified"){var v=a.util.keyCode(t);i=a.layout.parser.keys[v+""]}if((i=="KeyA"||i=="KeyY"||i=="KeyZ"||i=="KeyC"||i=="KeyV"||i=="KeyX")&&(e.ctrl&&!e.alt&&!e.shift)){return}if(e.currentLayout==e.defaultLayout&&i!="Escape"){return}switch(i){case"ControlLeft":case"ControlRight":e.ctrl=false;e.onCtrl();break;case"AltLeft":e.alt=false;e.onAlt();break;case"AltRight":e.altGr=false;e.onAltGr();break;case"ShiftLeft":case"ShiftRight":e.shift=false;e.onShift();break;case"Escape":e.onEsc();break;case"CapsLock":if(t.getModifierState&&t.getModifierState("CapsLock")){e.caps=false}e.onCapsLock();break;case"Backspace":e.onBackspace();a.util.preventDefault(t);break;case"Space":e.onSpace();a.util.preventDefault(t);break;case"Enter":e.onEnter();a.util.preventDefault(t);break;default:var u=a.layout.parser.codes[i];if(u!=undefined){e.onKey("k"+u);e.drawKeyboard();a.util.preventDefault(t);e.cancelkeypress=true}break}};if(a.util.opera){e.textbox.onkeypress=function(i){if(e.cancelkeypress){a.util.preventDefault(i);e.cancelkeypress=false}}}e.textbox.onkeyup=function(t){var i=a.util.code(t);if(i=="Unidentified"){var u=a.util.keyCode(t);i=a.layout.parser.keys[u+""]}switch(i){case"ControlLeft":case"ControlRight":e.ctrl=true;e.onCtrl();break;case"AltLeft":e.alt=true;e.onAlt();break;case"AltRight":e.altGr=true;e.onAltGr();break;case"ShiftLeft":case"ShiftRight":e.shift=true;e.onShift();break;default:}}};var o=false;try{var d="item";localStorage.setItem(d,d);localStorage.removeItem(d);o=true}catch(b){}var f=false;try{var p=JSON.parse(JSON.stringify({item:"item"}));if(p.item=="item"){f=true}}catch(b){}if(document.cookie.indexOf("read=true")!=-1){document.getElementById("gdpr").style.display="none"}document.getElementById("gdpr-btn").onclick=function(){document.getElementById("gdpr").style.display="none";document.cookie="read=true"};var g=null;var n={undo:[],redo:[],layout:null,fontSize:null};var s="swedish";g=new a.keyboard("keyboard","editor");var r=g.textbox;r.focus();if(o&&f){var p=JSON.parse(localStorage.getItem(s));if(p!=null){if(p.layout){n.layout=p.layout}if(p.undo){n.undo=p.undo}if(p.redo){n.redo=p.redo}if(p.fontSize){n.fontSize=p.fontSize}}}if(n.fontSize){g.setFontSize(n.fontSize)}var k=[{Id:"Swedish",Name:"Swedish",Json:{name:"Swedish",dir:"ltr",keys:[{i:"k0",c:"0",n:"§",s:"½"},{i:"k1",c:"0",n:"1",s:"!"},{i:"k2",c:"0",n:"2",s:'"',t:"@"},{i:"k3",c:"0",n:"3",s:"#",t:"£"},{i:"k4",c:"0",n:"4",s:"¤",t:"$"},{i:"k5",c:"0",n:"5",s:"%",t:"€"},{i:"k6",c:"0",n:"6",s:"&"},{i:"k7",c:"0",n:"7",s:"/",t:"{"},{i:"k8",c:"0",n:"8",s:"(",t:"["},{i:"k9",c:"0",n:"9",s:")",t:"]"},{i:"k10",c:"0",n:"0",s:"=",t:"}"},{i:"k11",c:"0",n:"+",s:"?",t:"\\"},{i:"k12",c:"0",n:"´",s:"`"},{i:"k13",c:"1",n:"q",s:"Q"},{i:"k14",c:"1",n:"w",s:"W"},{i:"k15",c:"1",n:"e",s:"E",t:"€"},{i:"k16",c:"1",n:"r",s:"R"},{i:"k17",c:"1",n:"t",s:"T"},{i:"k18",c:"1",n:"y",s:"Y"},{i:"k19",c:"1",n:"u",s:"U"},{i:"k20",c:"1",n:"i",s:"I"},{i:"k21",c:"1",n:"o",s:"O"},{i:"k22",c:"1",n:"p",s:"P"},{i:"k23",c:"1",n:"å",s:"Å"},{i:"k24",c:"0",n:"¨",s:"^",t:"~"},{i:"k25",c:"0",n:"'",s:"*"},{i:"k26",c:"1",n:"a",s:"A"},{i:"k27",c:"1",n:"s",s:"S"},{i:"k28",c:"1",n:"d",s:"D"},{i:"k29",c:"1",n:"f",s:"F"},{i:"k30",c:"1",n:"g",s:"G"},{i:"k31",c:"1",n:"h",s:"H"},{i:"k32",c:"1",n:"j",s:"J"},{i:"k33",c:"1",n:"k",s:"K"},{i:"k34",c:"1",n:"l",s:"L"},{i:"k35",c:"1",n:"ö",s:"Ö"},{i:"k36",c:"1",n:"ä",s:"Ä"},{i:"k37",c:"1",n:"z",s:"Z"},{i:"k38",c:"1",n:"x",s:"X"},{i:"k39",c:"1",n:"c",s:"C"},{i:"k40",c:"1",n:"v",s:"V"},{i:"k41",c:"1",n:"b",s:"B"},{i:"k42",c:"1",n:"n",s:"N"},{i:"k43",c:"1",n:"m",s:"M",t:"µ"},{i:"k44",c:"0",n:",",s:";"},{i:"k45",c:"0",n:".",s:":"},{i:"k46",c:"0",n:"-",s:"_"},{i:"k47",c:"0",n:"<",s:">",t:"|"}],deadkeys:[{k:"~",b:"A",c:"Ã"},{k:"´",b:"y",c:"ý"},{k:"`",b:"e",c:"è"},{k:"¨",b:"E",c:"Ë"},{k:"^",b:"e",c:"ê"},{k:"´",b:"´",c:"´"},{k:"¨",b:"u",c:"ü"},{k:"`",b:"u",c:"ù"},{k:"^",b:"a",c:"â"},{k:"~",b:"o",c:"õ"},{k:"~",b:"a",c:"ã"},{k:"´",b:"e",c:"é"},{k:"~",b:"N",c:"Ñ"},{k:"¨",b:"a",c:"ä"},{k:"¨",b:"U",c:"Ü"},{k:"`",b:"E",c:"È"},{k:"`",b:"i",c:"ì"},{k:"´",b:"Y",c:"Ý"},{k:"~",b:"n",c:"ñ"},{k:"´",b:"E",c:"É"},{k:"´",b:"I",c:"Í"},{k:"´",b:"o",c:"ó"},{k:"`",b:"a",c:"à"},{k:"`",b:"I",c:"Ì"},{k:"`",b:"A",c:"À"},{k:"¨",b:"y",c:"ÿ"},{k:"^",b:"A",c:"Â"},{k:"`",b:"U",c:"Ù"},{k:"`",b:"O",c:"Ò"},{k:"¨",b:"O",c:"Ö"},{k:"´",b:"u",c:"ú"},{k:"`",b:"`",c:"`"},{k:"~",b:"~",c:"~"},{k:"^",b:"u",c:"û"},{k:"^",b:"E",c:"Ê"},{k:"´",b:"i",c:"í"},{k:"¨",b:"¨",c:"¨"},{k:"¨",b:"A",c:"Ä"},{k:"¨",b:"e",c:"ë"},{k:"¨",b:"i",c:"ï"},{k:"¨",b:"o",c:"ö"},{k:"´",b:"A",c:"Á"},{k:"^",b:"O",c:"Ô"},{k:"~",b:"O",c:"Õ"},{k:"´",b:"a",c:"á"},{k:"¨",b:"I",c:"Ï"},{k:"´",b:"U",c:"Ú"},{k:"´",b:"O",c:"Ó"},{k:"^",b:"i",c:"î"},{k:"^",b:"U",c:"Û"},{k:"^",b:"o",c:"ô"},{k:"`",b:"o",c:"ò"},{k:"^",b:"I",c:"Î"},{k:"^",b:"^",c:"^"}]}}];if(k.length==1){g.loadVirtualLayout(k[0].Json)}else{var h=[];var l=[];if(!n.layout){n.layout=k[0].Id}var m=false;for(var c=0;c0?' style="margin-left:2em"':""),'> ",k[c].Name,"");l[c]=new a.layout();l[c].load(k[c].Json);if(n.layout==k[c].Id){g.loadVirtualLayout(k[c].Json);m=true}}if(m==false){g.loadVirtualLayout(k[0].Json)}var j=document.createElement("p");j.innerHTML=h.join("");document.getElementById("keyboard").appendChild(j);for(var c=0;c36){return}n.fontSize+=2;g.setFontSize(n.fontSize);g.drawKeyboard();if(o&&f){localStorage.setItem(s,JSON.stringify(n))}r.focus()};document.getElementById("email").onclick=function(){this.href="mailto: ?body="+r.value;r.focus();return true};document.getElementById("selectAll").onclick=function(){a.util.setCaretPosition(r,0,r.value.length);ga("send","event","Keyboard","click","Select");r.focus()};document.getElementById("copy").onclick=function(){a.util.setCaretPosition(r,0,r.value.length);var e=document.execCommand("copy");if(e){a.util.setCaretPosition(r,r.value.length,r.value.length);ga("send","event","Keyboard","click","Copy")}else{alert("Your browser does not allow automated copy. To copy the text in the text area, you can click Select All button and right click on the selected text. Then click the Copy option.");ga("send","event","Keyboard","click","Copy Fail")}r.focus()};if(o&&f){if(n.undo.length>0){r.value=n.undo.pop()}document.getElementById("clearAll").onclick=function(){if(r.value.length<10||confirm("Are you sure you want to clear all the text?")){ga("send","event","Keyboard","click","Clear");n.undo=[];n.redo=[];localStorage.setItem(s,JSON.stringify(n));r.value=""}r.focus()};document.getElementById("undo").onclick=function(){if(n.undo.length==0){return}var e=n.undo.pop();if(e!=r.value){n.redo.push(r.value);r.value=e}else{r.value=(n.undo.length==0?"":n.undo[n.undo.length-1]);n.redo.push(e)}localStorage.setItem(s,JSON.stringify(n));r.focus()};document.getElementById("redo").onclick=function(){if(n.redo.length==0){return}var e=n.redo.pop();r.value=e;n.undo.push(e);localStorage.setItem(s,JSON.stringify(n));r.focus()};setInterval(function(){var e=r.value;if(n.undo.length==0&&e.length==0){return}if(n.undo.length==0||e!=n.undo[n.undo.length-1]){n.undo.push(e);localStorage.setItem(s,JSON.stringify(n))}},3000)}else{document.getElementById("undo").style.display="none";document.getElementById("redo").style.display="none";document.getElementById("clearAll").style.display="none"}document.getElementById("postToTwitter").onclick=function(){ga("send","event","Keyboard","click","Twitter");document.getElementById("postToTwitter").href="https://twitter.com/intent/tweet?text="+encodeURIComponent(r.value);r.focus();return true};document.getElementById("searchGoogle").onclick=function(){ga("send","event","Keyboard","click","Google");document.getElementById("searchGoogle").href="https://www.google.com/search?ie=UTF-8&q="+encodeURIComponent(r.value);r.focus();return true};document.getElementById("translateGoogle").onclick=function(){ga("send","event","Keyboard","click","Translate");document.getElementById("translateGoogle").href="https://translate.google.com/#view=home&op=translate&sl=sv&tl=en&text="+encodeURIComponent(r.value);r.focus();return true};document.getElementById("saveAsTextFile").onsubmit=function(){ga("send","Keyboard","Save","send",(r.value.length>0?"valid":"invalid"));document.getElementById("data").value=r.value;r.focus();return true}})();