fixedkeys.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*
  2. * noVNC: HTML5 VNC client
  3. * Copyright (C) 2018 The noVNC Authors
  4. * Licensed under MPL 2.0 or any later version (see LICENSE.txt)
  5. */
  6. /*
  7. * Fallback mapping between HTML key codes (physical keys) and
  8. * HTML key values. This only works for keys that don't vary
  9. * between layouts. We also omit those who manage fine by mapping the
  10. * Unicode representation.
  11. *
  12. * See https://www.w3.org/TR/uievents-code/ for possible codes.
  13. * See https://www.w3.org/TR/uievents-key/ for possible values.
  14. */
  15. /* eslint-disable key-spacing */
  16. export default {
  17. // 3.1.1.1. Writing System Keys
  18. 'Backspace': 'Backspace',
  19. // 3.1.1.2. Functional Keys
  20. 'AltLeft': 'Alt',
  21. 'AltRight': 'Alt', // This could also be 'AltGraph'
  22. 'CapsLock': 'CapsLock',
  23. 'ContextMenu': 'ContextMenu',
  24. 'ControlLeft': 'Control',
  25. 'ControlRight': 'Control',
  26. 'Enter': 'Enter',
  27. 'MetaLeft': 'Meta',
  28. 'MetaRight': 'Meta',
  29. 'ShiftLeft': 'Shift',
  30. 'ShiftRight': 'Shift',
  31. 'Tab': 'Tab',
  32. // FIXME: Japanese/Korean keys
  33. // 3.1.2. Control Pad Section
  34. 'Delete': 'Delete',
  35. 'End': 'End',
  36. 'Help': 'Help',
  37. 'Home': 'Home',
  38. 'Insert': 'Insert',
  39. 'PageDown': 'PageDown',
  40. 'PageUp': 'PageUp',
  41. // 3.1.3. Arrow Pad Section
  42. 'ArrowDown': 'ArrowDown',
  43. 'ArrowLeft': 'ArrowLeft',
  44. 'ArrowRight': 'ArrowRight',
  45. 'ArrowUp': 'ArrowUp',
  46. // 3.1.4. Numpad Section
  47. 'NumLock': 'NumLock',
  48. 'NumpadBackspace': 'Backspace',
  49. 'NumpadClear': 'Clear',
  50. // 3.1.5. Function Section
  51. 'Escape': 'Escape',
  52. 'F1': 'F1',
  53. 'F2': 'F2',
  54. 'F3': 'F3',
  55. 'F4': 'F4',
  56. 'F5': 'F5',
  57. 'F6': 'F6',
  58. 'F7': 'F7',
  59. 'F8': 'F8',
  60. 'F9': 'F9',
  61. 'F10': 'F10',
  62. 'F11': 'F11',
  63. 'F12': 'F12',
  64. 'F13': 'F13',
  65. 'F14': 'F14',
  66. 'F15': 'F15',
  67. 'F16': 'F16',
  68. 'F17': 'F17',
  69. 'F18': 'F18',
  70. 'F19': 'F19',
  71. 'F20': 'F20',
  72. 'F21': 'F21',
  73. 'F22': 'F22',
  74. 'F23': 'F23',
  75. 'F24': 'F24',
  76. 'F25': 'F25',
  77. 'F26': 'F26',
  78. 'F27': 'F27',
  79. 'F28': 'F28',
  80. 'F29': 'F29',
  81. 'F30': 'F30',
  82. 'F31': 'F31',
  83. 'F32': 'F32',
  84. 'F33': 'F33',
  85. 'F34': 'F34',
  86. 'F35': 'F35',
  87. 'PrintScreen': 'PrintScreen',
  88. 'ScrollLock': 'ScrollLock',
  89. 'Pause': 'Pause',
  90. // 3.1.6. Media Keys
  91. 'BrowserBack': 'BrowserBack',
  92. 'BrowserFavorites': 'BrowserFavorites',
  93. 'BrowserForward': 'BrowserForward',
  94. 'BrowserHome': 'BrowserHome',
  95. 'BrowserRefresh': 'BrowserRefresh',
  96. 'BrowserSearch': 'BrowserSearch',
  97. 'BrowserStop': 'BrowserStop',
  98. 'Eject': 'Eject',
  99. 'LaunchApp1': 'LaunchMyComputer',
  100. 'LaunchApp2': 'LaunchCalendar',
  101. 'LaunchMail': 'LaunchMail',
  102. 'MediaPlayPause': 'MediaPlay',
  103. 'MediaStop': 'MediaStop',
  104. 'MediaTrackNext': 'MediaTrackNext',
  105. 'MediaTrackPrevious': 'MediaTrackPrevious',
  106. 'Power': 'Power',
  107. 'Sleep': 'Sleep',
  108. 'AudioVolumeDown': 'AudioVolumeDown',
  109. 'AudioVolumeMute': 'AudioVolumeMute',
  110. 'AudioVolumeUp': 'AudioVolumeUp',
  111. 'WakeUp': 'WakeUp',
  112. };