don't fire when alt or ctrl held

This commit is contained in:
James Campos 2010-11-14 03:34:31 -08:00
parent 475985b9f4
commit 272b7b856c
2 changed files with 4 additions and 0 deletions

View File

@ -371,6 +371,7 @@ keyAct = (e) ->
# [0-9;=A-Z]
unless 48 <= kc <= 90
return
if e.ctrlKey or e.altKey then return
e.preventDefault()
char = String.fromCharCode kc
hash = location.hash

View File

@ -457,6 +457,9 @@
if (!((48 <= kc) && (kc <= 90))) {
return null;
}
if (e.ctrlKey || e.altKey) {
return null;
}
e.preventDefault();
char = String.fromCharCode(kc);
hash = location.hash;