aboutsummaryrefslogtreecommitdiff
path: root/node_modules/react-dom/lib/getEventKey.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/react-dom/lib/getEventKey.js')
-rw-r--r--node_modules/react-dom/lib/getEventKey.js38
1 files changed, 24 insertions, 14 deletions
diff --git a/node_modules/react-dom/lib/getEventKey.js b/node_modules/react-dom/lib/getEventKey.js
index ad92bbd47..a8408b4c5 100644
--- a/node_modules/react-dom/lib/getEventKey.js
+++ b/node_modules/react-dom/lib/getEventKey.js
@@ -17,18 +17,18 @@ var getEventCharCode = require('./getEventCharCode');
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
*/
var normalizeKey = {
- 'Esc': 'Escape',
- 'Spacebar': ' ',
- 'Left': 'ArrowLeft',
- 'Up': 'ArrowUp',
- 'Right': 'ArrowRight',
- 'Down': 'ArrowDown',
- 'Del': 'Delete',
- 'Win': 'OS',
- 'Menu': 'ContextMenu',
- 'Apps': 'ContextMenu',
- 'Scroll': 'ScrollLock',
- 'MozPrintableKey': 'Unidentified'
+ Esc: 'Escape',
+ Spacebar: ' ',
+ Left: 'ArrowLeft',
+ Up: 'ArrowUp',
+ Right: 'ArrowRight',
+ Down: 'ArrowDown',
+ Del: 'Delete',
+ Win: 'OS',
+ Menu: 'ContextMenu',
+ Apps: 'ContextMenu',
+ Scroll: 'ScrollLock',
+ MozPrintableKey: 'Unidentified'
};
/**
@@ -58,8 +58,18 @@ var translateToKey = {
40: 'ArrowDown',
45: 'Insert',
46: 'Delete',
- 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',
- 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',
+ 112: 'F1',
+ 113: 'F2',
+ 114: 'F3',
+ 115: 'F4',
+ 116: 'F5',
+ 117: 'F6',
+ 118: 'F7',
+ 119: 'F8',
+ 120: 'F9',
+ 121: 'F10',
+ 122: 'F11',
+ 123: 'F12',
144: 'NumLock',
145: 'ScrollLock',
224: 'Meta'