don't break on unknown keys
This commit is contained in:
parent
9deffcfee2
commit
6988dfa89f
1 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@
|
||||||
function onKeydown(e) {
|
function onKeydown(e) {
|
||||||
var $element = Ox.Focus.focusedElement(),
|
var $element = Ox.Focus.focusedElement(),
|
||||||
isInput = Ox.Focus.focusedElementIsInput(),
|
isInput = Ox.Focus.focusedElementIsInput(),
|
||||||
keyName = Ox.KEYS[e.keyCode],
|
keyName = Ox.KEYS[e.keyCode] || ('keyCode' + e.keyCode),
|
||||||
keyBasename = keyName.split('.')[0],
|
keyBasename = keyName.split('.')[0],
|
||||||
key = Object.keys(Ox.MODIFIER_KEYS).filter(function(key) {
|
key = Object.keys(Ox.MODIFIER_KEYS).filter(function(key) {
|
||||||
return e[key] && Ox.MODIFIER_KEYS[key] != keyBasename;
|
return e[key] && Ox.MODIFIER_KEYS[key] != keyBasename;
|
||||||
|
|
Loading…
Reference in a new issue