Source

cyrs60v5 / Russian Keyboard.htm

Full commit
<html>
<head>
<meta name="Author" content="RussianKeyboard.com">
<meta content="text/html; charset=utf8" http-equiv="Content-Type">
<title>Russian Keyboard Online @ RussianKeyboard.com</title>
</head>

<style>
.b30 { color=black; width: 30px; background-color: #CCCCCC; font-family: Tahoma, Arial; font-size: 12px;}
.b80 { color=black; width: 80px; background-color: #CCCCCC; font-family: Tahoma, Arial; font-size: 12px;}
.b100 { color=black; width: 100px; background-color: #CCCCCC; font-family: Tahoma, Arial; font-size: 12px;}
.b300 { color=black; width: 300px; background-color: #CCCCCC; font-family: Tahoma, Arial; font-size: 12px;}
</style>

<script>
var l_letter = new Array('`','3','q','w','e','r','t','y','u','i','o','p','[',']','a','s','d','f','g','h','j','k','l',';',"'",'z','x','c','v','b','n','m',',','.','/','Shift','CapsLock',' ');
var lb_letter = new Array('~','#','Q','W','E','R','T','Y','U','I','O','P','{','}','A','S','D','F','G','H','J','K','L',':','"','Z','X','C','V','B','N','M','<','>','?','Shift','CapsLock',' ');
var r_letter = new Array('ё',"'",'й','ц','у','к','е','н','г','ш','щ','з','х','ъ','ф','ы','в','а','п','р','о','л','д','ж','э','я','ч','с','м','и','т','ь','б','ю','.','Shift','CapsLock',' ');
var rb_letter = new Array('Ё','№','Й','Ц','У','К','Е','Н','Г','Ш','Щ','З','Х','Ъ','Ф','Ы','В','А','П','Р','О','Л','Д','Ж','Э','Я','Ч','С','М','И','Т','Ь','Б','Ю',',','Shift','CapsLock',' ');
var ltype = new Array(2,0,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,3,3,3,3,2,2,3,3,3,3,3,3,3,2,2,0,3,3,3);
var letter = new Array(l_letter, lb_letter, r_letter, rb_letter);

var off = 1;
var keymode = 2;
var savemode = 0;
var qn = 38;
var shift = false;
var capslock = false;
var apostr = false;
var formname = "", textname = "";
var undotext = "";
var op;
var par = new String(location.search);

function changeLetter(n)
{
 var i;

 if((n != 5) && shift) keymode ^=1;
 keymode ^= n & 3;
 shift = ((n == 5) && !shift);
  
 for(i=0;i<qn;i++) document.keyb.elements[i+off].value = letter[(shift)?(keymode | (((ltype[i] >> (keymode >> 1)) & 1)^1)):(keymode & ((ltype[i] >> (keymode >> 1)) | 2))][i];

<!--  document.keyb.text.focus();  -->
 return false;
}

function addLetter(but)
{
 var chr = but.value;
 if( chr == 'Enter' ) chr='\n';
 document.keyb.text.value += chr;
 if(shift)
 {
  shift=false;
  changeLetter(1);  
 } 

<!--  document.keyb.text.focus(); -->
 return false;
}

function getpar(parname)
{
 var j,k;
 j = par.indexOf(parname + "=")
 if(j == -1) return null;
 k = par.indexOf("&", j + parname.length + 1);
 return par.substring(j + parname.length + 1, (k == -1) ? par.length : k);
}

function init()
{
 var i, s;
 var domain;

 if((s=getpar("form")) != null) formname = s; 
 if((s=getpar("text")) != null) textname = s; 
 if((s=getpar("savemode")) != null)
 {
  savemode = parseInt(s);
  if(isNaN(savemode) || savemode < 0 || savemode > 3) savemode = 0;
 }
 if((s=getpar("keymode")) != null) 
 {
  keymode = parseInt(s);
  if(isNaN(keymode) || keymode < 0 || keymode > 3) keymode = 2;
 }
 
 undotext = document.keyb.text.value;
 
 changeLetter(0);
 return false;
}

function cfocus()
{
 document.keyb.text.focus(); 
 return true;
}

</script>

<body bgcolor="#FFFFFF" leftmargin=4 topmargin=4 marginwidth=4 marginheight=4>


<table width=100% height=100% cellpadding=0 cellspacing=0 border=0>
<form name="keyb"><tr><td align=left valign=top>

<table width=590 cellspacing=0 cellpadding=1 border=0 bgcolor="#CCCCCC"><tr><td>
<table width=100% cellspacing=0 cellpadding=10 border=0 bgcolor="#F7F7F7"><tr><td align=center>
<textarea rows=5 cols=68 name="text" wrap="physical"></textarea><br>

<font size=-1>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<br>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<br>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<br>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<input type=button value="" onClick="return addLetter(this);" width=30 class=b30>
<br>
<input type=button value="" onClick="return changeLetter(5);" width=80 class=b80>
<input type=button value="" onClick="return changeLetter(1);" width=80 class=b80>
<input type=button value="" onClick="return addLetter(this);" width=300 class=b300>
</font>

</td></tr></table>
</td></tr></table>

</td></tr></form></table>

<script>
init();
</script>

</body>
</html>