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