event-keys.js 894 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* eslint sort-keys: ["error", "asc", {natural: true}] */
  2. 'use strict';
  3. // https://github.com/facebook/react/blob/b87aabd/packages/react-dom/src/events/getEventKey.js#L36
  4. // Only meta characters which can't be deciphered from `String.fromCharCode()`
  5. module.exports = {
  6. 8: 'Backspace',
  7. 9: 'Tab',
  8. 12: 'Clear',
  9. 13: 'Enter',
  10. 16: 'Shift',
  11. 17: 'Control',
  12. 18: 'Alt',
  13. 19: 'Pause',
  14. 20: 'CapsLock',
  15. 27: 'Escape',
  16. 32: ' ',
  17. 33: 'PageUp',
  18. 34: 'PageDown',
  19. 35: 'End',
  20. 36: 'Home',
  21. 37: 'ArrowLeft',
  22. 38: 'ArrowUp',
  23. 39: 'ArrowRight',
  24. 40: 'ArrowDown',
  25. 45: 'Insert',
  26. 46: 'Delete',
  27. 112: 'F1',
  28. 113: 'F2',
  29. 114: 'F3',
  30. 115: 'F4',
  31. 116: 'F5',
  32. 117: 'F6',
  33. 118: 'F7',
  34. 119: 'F8',
  35. 120: 'F9',
  36. 121: 'F10',
  37. 122: 'F11',
  38. 123: 'F12',
  39. 144: 'NumLock',
  40. 145: 'ScrollLock',
  41. 186: ';',
  42. 187: '=',
  43. 188: ',',
  44. 189: '-',
  45. 190: '.',
  46. 191: '/',
  47. 219: '[',
  48. 220: '\\',
  49. 221: ']',
  50. 222: '\'',
  51. 224: 'Meta',
  52. };