mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
parent
b6f9d73af0
commit
6a96a11549
1 changed files with 3 additions and 2 deletions
|
@ -81,8 +81,9 @@ var Key = new function() {
|
|||
// Use short version for arrow keys: ArrowLeft -> Left
|
||||
: /^Arrow[A-Z]/.test(key) ? key.substr(5)
|
||||
// This is far from ideal, but what else can we do?
|
||||
: key === 'Unidentified' ? String.fromCharCode(event.keyCode)
|
||||
: key;
|
||||
: key === 'Unidentified' || key === undefined
|
||||
? String.fromCharCode(event.keyCode)
|
||||
: key;
|
||||
return keyLookup[key] ||
|
||||
// Hyphenate camel-cased special keys, lower-case normal ones:
|
||||
(key.length > 1 ? Base.hyphenate(key) : key.toLowerCase());
|
||||
|
|
Loading…
Reference in a new issue