fixedkeys.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*
  2. * noVNC: HTML5 VNC client
  3. * Copyright (C) 2017 Pierre Ossman for Cendio AB
  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. export default {
  16. // 3.1.1.1. Writing System Keys
  17. 'Backspace': 'Backspace',
  18. // 3.1.1.2. Functional Keys
  19. 'AltLeft': 'Alt',
  20. 'AltRight': 'Alt', // This could also be 'AltGraph'
  21. 'CapsLock': 'CapsLock',
  22. 'ContextMenu': 'ContextMenu',
  23. 'ControlLeft': 'Control',
  24. 'ControlRight': 'Control',
  25. 'Enter': 'Enter',
  26. 'MetaLeft': 'Meta',
  27. 'MetaRight': 'Meta',
  28. 'ShiftLeft': 'Shift',
  29. 'ShiftRight': 'Shift',
  30. 'Tab': 'Tab',
  31. // FIXME: Japanese/Korean keys
  32. // 3.1.2. Control Pad Section
  33. 'Delete': 'Delete',
  34. 'End': 'End',
  35. 'Help': 'Help',
  36. 'Home': 'Home',
  37. 'Insert': 'Insert',
  38. 'PageDown': 'PageDown',
  39. 'PageUp': 'PageUp',
  40. // 3.1.3. Arrow Pad Section
  41. 'ArrowDown': 'ArrowDown',
  42. 'ArrowLeft': 'ArrowLeft',
  43. 'ArrowRight': 'ArrowRight',
  44. 'ArrowUp': 'ArrowUp',
  45. // 3.1.4. Numpad Section
  46. 'NumLock': 'NumLock',
  47. 'NumpadBackspace': 'Backspace',
  48. 'NumpadClear': 'Clear',
  49. // 3.1.5. Function Section
  50. 'Escape': 'Escape',
  51. 'F1': 'F1',
  52. 'F2': 'F2',
  53. 'F3': 'F3',
  54. 'F4': 'F4',
  55. 'F5': 'F5',
  56. 'F6': 'F6',
  57. 'F7': 'F7',
  58. 'F8': 'F8',
  59. 'F9': 'F9',
  60. 'F10': 'F10',
  61. 'F11': 'F11',
  62. 'F12': 'F12',
  63. 'F13': 'F13',
  64. 'F14': 'F14',
  65. 'F15': 'F15',
  66. 'F16': 'F16',
  67. 'F17': 'F17',
  68. 'F18': 'F18',
  69. 'F19': 'F19',
  70. 'F20': 'F20',
  71. 'F21': 'F21',
  72. 'F22': 'F22',
  73. 'F23': 'F23',
  74. 'F24': 'F24',
  75. 'F25': 'F25',
  76. 'F26': 'F26',
  77. 'F27': 'F27',
  78. 'F28': 'F28',
  79. 'F29': 'F29',
  80. 'F30': 'F30',
  81. 'F31': 'F31',
  82. 'F32': 'F32',
  83. 'F33': 'F33',
  84. 'F34': 'F34',
  85. 'F35': 'F35',
  86. 'PrintScreen': 'PrintScreen',
  87. 'ScrollLock': 'ScrollLock',
  88. 'Pause': 'Pause',
  89. // 3.1.6. Media Keys
  90. 'BrowserBack': 'BrowserBack',
  91. 'BrowserFavorites': 'BrowserFavorites',
  92. 'BrowserForward': 'BrowserForward',
  93. 'BrowserHome': 'BrowserHome',
  94. 'BrowserRefresh': 'BrowserRefresh',
  95. 'BrowserSearch': 'BrowserSearch',
  96. 'BrowserStop': 'BrowserStop',
  97. 'Eject': 'Eject',
  98. 'LaunchApp1': 'LaunchMyComputer',
  99. 'LaunchApp2': 'LaunchCalendar',
  100. 'LaunchMail': 'LaunchMail',
  101. 'MediaPlayPause': 'MediaPlay',
  102. 'MediaStop': 'MediaStop',
  103. 'MediaTrackNext': 'MediaTrackNext',
  104. 'MediaTrackPrevious': 'MediaTrackPrevious',
  105. 'Power': 'Power',
  106. 'Sleep': 'Sleep',
  107. 'AudioVolumeDown': 'AudioVolumeDown',
  108. 'AudioVolumeMute': 'AudioVolumeMute',
  109. 'AudioVolumeUp': 'AudioVolumeUp',
  110. 'WakeUp': 'WakeUp',
  111. };