This commit is contained in:
James Campos 2011-09-05 15:35:39 -07:00
parent a56f52c765
commit ccffa3a61f
2 changed files with 9 additions and 9 deletions

View File

@ -867,7 +867,7 @@
return e.preventDefault();
},
keyCode: function(e) {
var kc;
var c, kc;
key = (function() {
switch (kc = e.keyCode) {
case 8:
@ -892,6 +892,7 @@
case 55:
case 56:
case 57:
return String.fromCharCode(kc);
case 65:
case 66:
case 67:
@ -918,10 +919,9 @@
case 88:
case 89:
case 90:
c = String.fromCharCode(kc);
if (e.shiftKey) {
return String.fromCharCode(kc);
} else {
return String.fromCharCode(kc).toLowerCase();
return c.toLowerCase();
}
break;
default:

View File

@ -632,11 +632,11 @@ keybinds =
'Right'
when 40
'Down'
when 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90 #0-9 and A-Z
if e.shiftKey
String.fromCharCode kc
else
String.fromCharCode(kc).toLowerCase()
when 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 #0-9
String.fromCharCode kc
when 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90 #A-Z
c = String.fromCharCode kc
c.toLowerCase() if e.shiftKey
else
null
if key