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

View File

@ -632,11 +632,11 @@ keybinds =
'Right' 'Right'
when 40 when 40
'Down' '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 when 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 #0-9
if e.shiftKey String.fromCharCode kc
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
else c = String.fromCharCode kc
String.fromCharCode(kc).toLowerCase() c.toLowerCase() if e.shiftKey
else else
null null
if key if key