Skip to content

Commit b7e77e4

Browse files
author
Chris K
committed
Hacks to work around issues on Mac.
1 parent 7974123 commit b7e77e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ui-scripts/actions/keyidentifier.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
/* private */
77

8+
var EXCEPTIONS = ["Backspace", "Tab", "Enter", "Spacebar"];
9+
810
this._named_shortcuts = {};
911
this._char_shortcuts = {};
1012
this._name_keycode_map = KeyIdentifier.named_keys;
@@ -204,7 +206,7 @@
204206
return m_key | (event[mod + "Key"] ? Math.pow(2, index) : 0);
205207
}, 0);
206208

207-
if (event.key.length > 1)
209+
if (EXCEPTIONS.indexOf(event.key) != -1 || (!event.char && event.key.length > 1))
208210
{
209211
var key_id = this._name_keycode_map[event.key] << 4 | mod_key;
210212
if (key_id in this._named_shortcuts)

0 commit comments

Comments
 (0)