-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add key event property * check without test * Fails on firefox * Remove the commented tests * Fix adding key property with KeyboarEvent * Use the correct key value for KeyboardEvent * set key once
- Loading branch information
1 parent
cb614a6
commit c9dfa58
Showing
6 changed files
with
166 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,9 @@ | |
"start": true, | ||
"stop": true, | ||
|
||
"formElExp": true | ||
"formElExp": true, | ||
"KeyboardEvent": true | ||
|
||
}, | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
var syn = require('./synthetic'); | ||
|
||
// For more details please refer to: | ||
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values | ||
|
||
syn.key.keyboardEventKeys = { | ||
//backspace | ||
'\b': 'Backspace', | ||
|
||
//tab | ||
'\t': 'Tab', | ||
|
||
//enter | ||
'\r': 'Enter', | ||
|
||
//modifier keys | ||
'shift': 'Shift', | ||
'ctrl': 'Control', | ||
'alt': 'Alt', | ||
'meta': 'Meta', | ||
|
||
//weird | ||
'pause-break': 'Pause', | ||
'caps': 'CapsLock', | ||
'escape': 'Escape', | ||
'num-lock': 'NumLock', | ||
'scroll-lock': 'ScrollLock', | ||
'print': 'Print', | ||
|
||
//navigation | ||
'page-up': 'PageUp', | ||
'page-down': 'PageDown', | ||
'end': 'End', | ||
'home': 'Home', | ||
'left': 'ArrowLeft', | ||
'up': 'ArrowUp', | ||
'right': 'ArrowRight', | ||
'down': 'ArrowDown', | ||
'insert': 'Insert', | ||
'delete': 'Delete', | ||
|
||
'f1': 'F1', | ||
'f2': 'F2', | ||
'f3': 'F3', | ||
'f4': 'F4', | ||
'f5': 'F5', | ||
'f6': 'F6', | ||
'f7': 'F7', | ||
'f8': 'F8', | ||
'f9': 'F9', | ||
'f10': 'F10', | ||
'f11': 'F11', | ||
'f12': 'F12' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters