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) {
|
||||
var $element = Ox.Focus.focusedElement(),
|
||||
isInput = Ox.Focus.focusedElementIsInput(),
|
||||
keyName = Ox.KEYS[e.keyCode],
|
||||
keyName = Ox.KEYS[e.keyCode] || ('keyCode' + e.keyCode),
|
||||
keyBasename = keyName.split('.')[0],
|
||||
key = Object.keys(Ox.MODIFIER_KEYS).filter(function(key) {
|
||||
return e[key] && Ox.MODIFIER_KEYS[key] != keyBasename;
|
||||
|
@ -499,4 +499,4 @@
|
|||
document.addEventListener('keydown', onKeydown);
|
||||
window.addEventListener('message', onMessage);
|
||||
|
||||
}());
|
||||
}());
|
||||
|
|
Loading…
Reference in a new issue