@illgrenoble/webx-client 1.9.3 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/dist/input/GuacamoleKeyboard.js +118 -99
  2. package/dist/input/WebXKeyboard.d.ts +0 -16
  3. package/dist/input/WebXKeyboard.js +3 -26
  4. package/dist/input/WebXKeyboard.js.map +1 -1
  5. package/package.json +1 -1
  6. package/dist/display/WebXMaterialProvider.d.ts +0 -8
  7. package/dist/display/WebXMaterialProvider.js +0 -71
  8. package/dist/display/WebXMaterialProvider.js.map +0 -1
  9. package/dist/input/WebXNewKeyboard.d.ts +0 -62
  10. package/dist/input/WebXNewKeyboard.js +0 -94
  11. package/dist/input/WebXNewKeyboard.js.map +0 -1
  12. package/dist/input/keyboard/WebXKeyEvent.d.ts +0 -79
  13. package/dist/input/keyboard/WebXKeyEvent.js +0 -324
  14. package/dist/input/keyboard/WebXKeyEvent.js.map +0 -1
  15. package/dist/input/keyboard/WebXKeyPressEvent.d.ts +0 -30
  16. package/dist/input/keyboard/WebXKeyPressEvent.js +0 -44
  17. package/dist/input/keyboard/WebXKeyPressEvent.js.map +0 -1
  18. package/dist/input/keyboard/WebXKeyUpEvent.d.ts +0 -33
  19. package/dist/input/keyboard/WebXKeyUpEvent.js +0 -31
  20. package/dist/input/keyboard/WebXKeyUpEvent.js.map +0 -1
  21. package/dist/input/keyboard/WebXKeyboardModifierState.d.ts +0 -108
  22. package/dist/input/keyboard/WebXKeyboardModifierState.js +0 -148
  23. package/dist/input/keyboard/WebXKeyboardModifierState.js.map +0 -1
  24. package/dist/input/keyboard/WebXKeyboardUtils.d.ts +0 -25
  25. package/dist/input/keyboard/WebXKeyboardUtils.js +0 -63
  26. package/dist/input/keyboard/WebXKeyboardUtils.js.map +0 -1
  27. package/dist/input/keyboard/WebXKeydownEvent.d.ts +0 -46
  28. package/dist/input/keyboard/WebXKeydownEvent.js +0 -66
  29. package/dist/input/keyboard/WebXKeydownEvent.js.map +0 -1
  30. package/dist/input/keyboard/index.d.ts +0 -6
  31. package/dist/input/keyboard/index.js +0 -23
  32. package/dist/input/keyboard/index.js.map +0 -1
  33. package/dist/lib/GuacamoleKeyboard.js +0 -1290
  34. package/dist/lib/GuacamoleKeyboard.js.map +0 -1
  35. package/dist/message/WebXPollMessage.d.ts +0 -4
  36. package/dist/message/WebXPollMessage.js +0 -12
  37. package/dist/message/WebXPollMessage.js.map +0 -1
  38. package/dist/src/WebXClient.d.ts +0 -261
  39. package/dist/src/WebXClient.js +0 -571
  40. package/dist/src/WebXClient.js.map +0 -1
  41. package/dist/src/WebXEngine.d.ts +0 -4
  42. package/dist/src/WebXEngine.js +0 -7
  43. package/dist/src/WebXEngine.js.map +0 -1
  44. package/dist/src/display/WebXCursor.d.ts +0 -88
  45. package/dist/src/display/WebXCursor.js +0 -150
  46. package/dist/src/display/WebXCursor.js.map +0 -1
  47. package/dist/src/display/WebXCursorFactory.d.ts +0 -36
  48. package/dist/src/display/WebXCursorFactory.js +0 -59
  49. package/dist/src/display/WebXCursorFactory.js.map +0 -1
  50. package/dist/src/display/WebXDisplay.d.ts +0 -226
  51. package/dist/src/display/WebXDisplay.js +0 -424
  52. package/dist/src/display/WebXDisplay.js.map +0 -1
  53. package/dist/src/display/WebXMaterial.d.ts +0 -14
  54. package/dist/src/display/WebXMaterial.js +0 -140
  55. package/dist/src/display/WebXMaterial.js.map +0 -1
  56. package/dist/src/display/WebXSubImage.d.ts +0 -50
  57. package/dist/src/display/WebXSubImage.js +0 -26
  58. package/dist/src/display/WebXSubImage.js.map +0 -1
  59. package/dist/src/display/WebXTextureFactory.d.ts +0 -54
  60. package/dist/src/display/WebXTextureFactory.js +0 -160
  61. package/dist/src/display/WebXTextureFactory.js.map +0 -1
  62. package/dist/src/display/WebXWindow.d.ts +0 -241
  63. package/dist/src/display/WebXWindow.js +0 -438
  64. package/dist/src/display/WebXWindow.js.map +0 -1
  65. package/dist/src/display/WebXWindowProperties.d.ts +0 -44
  66. package/dist/src/display/WebXWindowProperties.js +0 -25
  67. package/dist/src/display/WebXWindowProperties.js.map +0 -1
  68. package/dist/src/display/index.d.ts +0 -7
  69. package/dist/src/display/index.js +0 -24
  70. package/dist/src/display/index.js.map +0 -1
  71. package/dist/src/index.d.ts +0 -7
  72. package/dist/src/index.js +0 -24
  73. package/dist/src/index.js.map +0 -1
  74. package/dist/src/input/WebXKeyboard.d.ts +0 -265
  75. package/dist/src/input/WebXKeyboard.js +0 -632
  76. package/dist/src/input/WebXKeyboard.js.map +0 -1
  77. package/dist/src/input/WebXMouse.d.ts +0 -125
  78. package/dist/src/input/WebXMouse.js +0 -231
  79. package/dist/src/input/WebXMouse.js.map +0 -1
  80. package/dist/src/input/index.d.ts +0 -4
  81. package/dist/src/input/index.js +0 -21
  82. package/dist/src/input/index.js.map +0 -1
  83. package/dist/src/input/keyboard/WebXKeyEvent.d.ts +0 -79
  84. package/dist/src/input/keyboard/WebXKeyEvent.js +0 -324
  85. package/dist/src/input/keyboard/WebXKeyEvent.js.map +0 -1
  86. package/dist/src/input/keyboard/WebXKeyPressEvent.d.ts +0 -30
  87. package/dist/src/input/keyboard/WebXKeyPressEvent.js +0 -44
  88. package/dist/src/input/keyboard/WebXKeyPressEvent.js.map +0 -1
  89. package/dist/src/input/keyboard/WebXKeyUpEvent.d.ts +0 -33
  90. package/dist/src/input/keyboard/WebXKeyUpEvent.js +0 -31
  91. package/dist/src/input/keyboard/WebXKeyUpEvent.js.map +0 -1
  92. package/dist/src/input/keyboard/WebXKeyboardModifierState.d.ts +0 -108
  93. package/dist/src/input/keyboard/WebXKeyboardModifierState.js +0 -148
  94. package/dist/src/input/keyboard/WebXKeyboardModifierState.js.map +0 -1
  95. package/dist/src/input/keyboard/WebXKeyboardUtils.d.ts +0 -25
  96. package/dist/src/input/keyboard/WebXKeyboardUtils.js +0 -63
  97. package/dist/src/input/keyboard/WebXKeyboardUtils.js.map +0 -1
  98. package/dist/src/input/keyboard/WebXKeydownEvent.d.ts +0 -46
  99. package/dist/src/input/keyboard/WebXKeydownEvent.js +0 -66
  100. package/dist/src/input/keyboard/WebXKeydownEvent.js.map +0 -1
  101. package/dist/src/input/keyboard/index.d.ts +0 -6
  102. package/dist/src/input/keyboard/index.js +0 -23
  103. package/dist/src/input/keyboard/index.js.map +0 -1
  104. package/dist/src/input/mouse/WebXMouseState.d.ts +0 -190
  105. package/dist/src/input/mouse/WebXMouseState.js +0 -217
  106. package/dist/src/input/mouse/WebXMouseState.js.map +0 -1
  107. package/dist/src/input/mouse/index.d.ts +0 -1
  108. package/dist/src/input/mouse/index.js +0 -18
  109. package/dist/src/input/mouse/index.js.map +0 -1
  110. package/dist/src/instruction/WebXClipboardInstruction.d.ts +0 -18
  111. package/dist/src/instruction/WebXClipboardInstruction.js +0 -23
  112. package/dist/src/instruction/WebXClipboardInstruction.js.map +0 -1
  113. package/dist/src/instruction/WebXConnectInstruction.d.ts +0 -19
  114. package/dist/src/instruction/WebXConnectInstruction.js +0 -24
  115. package/dist/src/instruction/WebXConnectInstruction.js.map +0 -1
  116. package/dist/src/instruction/WebXCursorImageInstruction.d.ts +0 -18
  117. package/dist/src/instruction/WebXCursorImageInstruction.js +0 -23
  118. package/dist/src/instruction/WebXCursorImageInstruction.js.map +0 -1
  119. package/dist/src/instruction/WebXDataAckInstruction.d.ts +0 -25
  120. package/dist/src/instruction/WebXDataAckInstruction.js +0 -26
  121. package/dist/src/instruction/WebXDataAckInstruction.js.map +0 -1
  122. package/dist/src/instruction/WebXImageInstruction.d.ts +0 -18
  123. package/dist/src/instruction/WebXImageInstruction.js +0 -23
  124. package/dist/src/instruction/WebXImageInstruction.js.map +0 -1
  125. package/dist/src/instruction/WebXInstruction.d.ts +0 -29
  126. package/dist/src/instruction/WebXInstruction.js +0 -28
  127. package/dist/src/instruction/WebXInstruction.js.map +0 -1
  128. package/dist/src/instruction/WebXInstructionResponse.d.ts +0 -66
  129. package/dist/src/instruction/WebXInstructionResponse.js +0 -78
  130. package/dist/src/instruction/WebXInstructionResponse.js.map +0 -1
  131. package/dist/src/instruction/WebXInstructionType.d.ts +0 -63
  132. package/dist/src/instruction/WebXInstructionType.js +0 -96
  133. package/dist/src/instruction/WebXInstructionType.js.map +0 -1
  134. package/dist/src/instruction/WebXKeyboardInstruction.d.ts +0 -23
  135. package/dist/src/instruction/WebXKeyboardInstruction.js +0 -25
  136. package/dist/src/instruction/WebXKeyboardInstruction.js.map +0 -1
  137. package/dist/src/instruction/WebXMouseInstruction.d.ts +0 -28
  138. package/dist/src/instruction/WebXMouseInstruction.js +0 -27
  139. package/dist/src/instruction/WebXMouseInstruction.js.map +0 -1
  140. package/dist/src/instruction/WebXPongInstruction.d.ts +0 -18
  141. package/dist/src/instruction/WebXPongInstruction.js +0 -23
  142. package/dist/src/instruction/WebXPongInstruction.js.map +0 -1
  143. package/dist/src/instruction/WebXQualityInstruction.d.ts +0 -19
  144. package/dist/src/instruction/WebXQualityInstruction.js +0 -24
  145. package/dist/src/instruction/WebXQualityInstruction.js.map +0 -1
  146. package/dist/src/instruction/WebXScreenInstruction.d.ts +0 -12
  147. package/dist/src/instruction/WebXScreenInstruction.js +0 -20
  148. package/dist/src/instruction/WebXScreenInstruction.js.map +0 -1
  149. package/dist/src/instruction/WebXShapeInstruction.d.ts +0 -18
  150. package/dist/src/instruction/WebXShapeInstruction.js +0 -23
  151. package/dist/src/instruction/WebXShapeInstruction.js.map +0 -1
  152. package/dist/src/instruction/WebXWindowsInstruction.d.ts +0 -13
  153. package/dist/src/instruction/WebXWindowsInstruction.js +0 -21
  154. package/dist/src/instruction/WebXWindowsInstruction.js.map +0 -1
  155. package/dist/src/instruction/index.d.ts +0 -15
  156. package/dist/src/instruction/index.js +0 -32
  157. package/dist/src/instruction/index.js.map +0 -1
  158. package/dist/src/message/WebXClipboardMessage.d.ts +0 -19
  159. package/dist/src/message/WebXClipboardMessage.js +0 -23
  160. package/dist/src/message/WebXClipboardMessage.js.map +0 -1
  161. package/dist/src/message/WebXConnectionMessage.d.ts +0 -12
  162. package/dist/src/message/WebXConnectionMessage.js +0 -20
  163. package/dist/src/message/WebXConnectionMessage.js.map +0 -1
  164. package/dist/src/message/WebXCursorImageMessage.d.ts +0 -46
  165. package/dist/src/message/WebXCursorImageMessage.js +0 -35
  166. package/dist/src/message/WebXCursorImageMessage.js.map +0 -1
  167. package/dist/src/message/WebXImageMessage.d.ts +0 -41
  168. package/dist/src/message/WebXImageMessage.js +0 -33
  169. package/dist/src/message/WebXImageMessage.js.map +0 -1
  170. package/dist/src/message/WebXMessage.d.ts +0 -24
  171. package/dist/src/message/WebXMessage.js +0 -23
  172. package/dist/src/message/WebXMessage.js.map +0 -1
  173. package/dist/src/message/WebXMessageType.d.ts +0 -59
  174. package/dist/src/message/WebXMessageType.js +0 -64
  175. package/dist/src/message/WebXMessageType.js.map +0 -1
  176. package/dist/src/message/WebXMouseMessage.d.ts +0 -30
  177. package/dist/src/message/WebXMouseMessage.js +0 -29
  178. package/dist/src/message/WebXMouseMessage.js.map +0 -1
  179. package/dist/src/message/WebXNopMessage.d.ts +0 -10
  180. package/dist/src/message/WebXNopMessage.js +0 -18
  181. package/dist/src/message/WebXNopMessage.js.map +0 -1
  182. package/dist/src/message/WebXPingMessage.d.ts +0 -13
  183. package/dist/src/message/WebXPingMessage.js +0 -21
  184. package/dist/src/message/WebXPingMessage.js.map +0 -1
  185. package/dist/src/message/WebXQualityMessage.d.ts +0 -39
  186. package/dist/src/message/WebXQualityMessage.js +0 -32
  187. package/dist/src/message/WebXQualityMessage.js.map +0 -1
  188. package/dist/src/message/WebXScreenMessage.d.ts +0 -37
  189. package/dist/src/message/WebXScreenMessage.js +0 -29
  190. package/dist/src/message/WebXScreenMessage.js.map +0 -1
  191. package/dist/src/message/WebXShapeMessage.d.ts +0 -31
  192. package/dist/src/message/WebXShapeMessage.js +0 -29
  193. package/dist/src/message/WebXShapeMessage.js.map +0 -1
  194. package/dist/src/message/WebXSubImagesMessage.d.ts +0 -31
  195. package/dist/src/message/WebXSubImagesMessage.js +0 -29
  196. package/dist/src/message/WebXSubImagesMessage.js.map +0 -1
  197. package/dist/src/message/WebXWindowsMessage.d.ts +0 -21
  198. package/dist/src/message/WebXWindowsMessage.js +0 -25
  199. package/dist/src/message/WebXWindowsMessage.js.map +0 -1
  200. package/dist/src/message/index.d.ts +0 -14
  201. package/dist/src/message/index.js +0 -31
  202. package/dist/src/message/index.js.map +0 -1
  203. package/dist/src/tracer/WebXDebugImageMessageHandler.d.ts +0 -48
  204. package/dist/src/tracer/WebXDebugImageMessageHandler.js +0 -102
  205. package/dist/src/tracer/WebXDebugImageMessageHandler.js.map +0 -1
  206. package/dist/src/tracer/WebXHandler.d.ts +0 -14
  207. package/dist/src/tracer/WebXHandler.js +0 -3
  208. package/dist/src/tracer/WebXHandler.js.map +0 -1
  209. package/dist/src/tracer/WebXInstructionHandler.d.ts +0 -21
  210. package/dist/src/tracer/WebXInstructionHandler.js +0 -13
  211. package/dist/src/tracer/WebXInstructionHandler.js.map +0 -1
  212. package/dist/src/tracer/WebXMessageHandler.d.ts +0 -21
  213. package/dist/src/tracer/WebXMessageHandler.js +0 -13
  214. package/dist/src/tracer/WebXMessageHandler.js.map +0 -1
  215. package/dist/src/tracer/WebXStatsHandler.d.ts +0 -23
  216. package/dist/src/tracer/WebXStatsHandler.js +0 -13
  217. package/dist/src/tracer/WebXStatsHandler.js.map +0 -1
  218. package/dist/src/tracer/index.d.ts +0 -5
  219. package/dist/src/tracer/index.js +0 -22
  220. package/dist/src/tracer/index.js.map +0 -1
  221. package/dist/src/transport/WebXBinarySerializer.d.ts +0 -31
  222. package/dist/src/transport/WebXBinarySerializer.js +0 -63
  223. package/dist/src/transport/WebXBinarySerializer.js.map +0 -1
  224. package/dist/src/transport/WebXInstructionBuffer.d.ts +0 -55
  225. package/dist/src/transport/WebXInstructionBuffer.js +0 -109
  226. package/dist/src/transport/WebXInstructionBuffer.js.map +0 -1
  227. package/dist/src/transport/WebXInstructionEncoder.d.ts +0 -181
  228. package/dist/src/transport/WebXInstructionEncoder.js +0 -294
  229. package/dist/src/transport/WebXInstructionEncoder.js.map +0 -1
  230. package/dist/src/transport/WebXMessageBuffer.d.ts +0 -80
  231. package/dist/src/transport/WebXMessageBuffer.js +0 -104
  232. package/dist/src/transport/WebXMessageBuffer.js.map +0 -1
  233. package/dist/src/transport/WebXMessageDecoder.d.ts +0 -108
  234. package/dist/src/transport/WebXMessageDecoder.js +0 -332
  235. package/dist/src/transport/WebXMessageDecoder.js.map +0 -1
  236. package/dist/src/transport/index.d.ts +0 -5
  237. package/dist/src/transport/index.js +0 -22
  238. package/dist/src/transport/index.js.map +0 -1
  239. package/dist/src/tunnel/WebXTunnel.d.ts +0 -93
  240. package/dist/src/tunnel/WebXTunnel.js +0 -156
  241. package/dist/src/tunnel/WebXTunnel.js.map +0 -1
  242. package/dist/src/tunnel/WebXWebSocketTunnel.d.ts +0 -40
  243. package/dist/src/tunnel/WebXWebSocketTunnel.js +0 -88
  244. package/dist/src/tunnel/WebXWebSocketTunnel.js.map +0 -1
  245. package/dist/src/tunnel/index.d.ts +0 -2
  246. package/dist/src/tunnel/index.js +0 -19
  247. package/dist/src/tunnel/index.js.map +0 -1
  248. package/dist/src/utils/WebXColorGenerator.d.ts +0 -24
  249. package/dist/src/utils/WebXColorGenerator.js +0 -46
  250. package/dist/src/utils/WebXColorGenerator.js.map +0 -1
  251. package/dist/src/utils/WebXVersion.d.ts +0 -34
  252. package/dist/src/utils/WebXVersion.js +0 -25
  253. package/dist/src/utils/WebXVersion.js.map +0 -1
  254. package/dist/src/utils/index.d.ts +0 -2
  255. package/dist/src/utils/index.js +0 -19
  256. package/dist/src/utils/index.js.map +0 -1
  257. package/dist/tracer/DemoVisualMessageHandler.d.ts +0 -15
  258. package/dist/tracer/DemoVisualMessageHandler.js +0 -55
  259. package/dist/tracer/DemoVisualMessageHandler.js.map +0 -1
  260. package/dist/tracer/WebXVisualMessageHandler.d.ts +0 -15
  261. package/dist/tracer/WebXVisualMessageHandler.js +0 -55
  262. package/dist/tracer/WebXVisualMessageHandler.js.map +0 -1
  263. package/dist/tunnel/WebXDefaultQoSHandler.d.ts +0 -16
  264. package/dist/tunnel/WebXDefaultQoSHandler.js +0 -57
  265. package/dist/tunnel/WebXDefaultQoSHandler.js.map +0 -1
  266. package/dist/tunnel/WebXQoSHandler.d.ts +0 -6
  267. package/dist/tunnel/WebXQoSHandler.js +0 -7
  268. package/dist/tunnel/WebXQoSHandler.js.map +0 -1
  269. package/dist/tunnel/WebXSocketIOTunnel.d.ts +0 -15
  270. package/dist/tunnel/WebXSocketIOTunnel.js +0 -41
  271. package/dist/tunnel/WebXSocketIOTunnel.js.map +0 -1
  272. package/dist/utils/ColorGenerator.d.ts +0 -24
  273. package/dist/utils/ColorGenerator.js +0 -46
  274. package/dist/utils/ColorGenerator.js.map +0 -1
  275. package/dist/utils/Config.d.ts +0 -4
  276. package/dist/utils/Config.js +0 -10
  277. package/dist/utils/Config.js.map +0 -1
  278. package/dist/utils/WebXAsyncExec.d.ts +0 -5
  279. package/dist/utils/WebXAsyncExec.js +0 -18
  280. package/dist/utils/WebXAsyncExec.js.map +0 -1
  281. package/dist/utils/WebXColourGenerator.d.ts +0 -5
  282. package/dist/utils/WebXColourGenerator.js +0 -27
  283. package/dist/utils/WebXColourGenerator.js.map +0 -1
  284. package/dist/utils/WebXFileSize.d.ts +0 -3
  285. package/dist/utils/WebXFileSize.js +0 -14
  286. package/dist/utils/WebXFileSize.js.map +0 -1
@@ -1,79 +0,0 @@
1
- /**
2
- * A key event having a corresponding timestamp. This event is non-specific.
3
- * Its subclasses should be used instead when recording specific key
4
- * events.
5
- *
6
- * Base class for all keyboard events in the WebX client.
7
- *
8
- * This class provides common properties and methods for handling keyboard events.
9
- */
10
- export declare abstract class WebXKeyEvent {
11
- /**
12
- * Map of known JavaScript keyidentifiers which do not map to typable
13
- * characters to their unshifted X11 keysym equivalents.
14
- */
15
- static keyidentifier_keysym: {
16
- [index: string]: Array<number>;
17
- };
18
- /**
19
- * Map of known JavaScript keycodes which do not map to typable characters
20
- * to their X11 keysym equivalents.
21
- */
22
- static keycodeKeysyms: {
23
- [index: number]: Array<number>;
24
- };
25
- /**
26
- * Whether the default action of this key event should be prevented.
27
- */
28
- protected _defaultPrevented: boolean;
29
- /**
30
- * The keysym of the key associated with this key event, as determined
31
- * by a best-effort guess using available event properties and keyboard
32
- * state.
33
- */
34
- protected _keysym: number;
35
- /**
36
- * Whether the keysym value of this key event is known to be reliable.
37
- * If false, the keysym may still be valid, but it's only a best guess,
38
- * and future key events may be a better source of information.
39
- */
40
- protected _reliable: boolean;
41
- /**
42
- * Gets whether the default action of this key event should be prevented.
43
- */
44
- get defaultPrevented(): boolean;
45
- /**
46
- * Sets whether the default action of this key event should be prevented.
47
- */
48
- set defaultPrevented(defaultPrevented: boolean);
49
- /**
50
- * Gets the keysym of the key associated with this key event.
51
- */
52
- get keysym(): number;
53
- /**
54
- * Sets the keysym of the key associated with this key event.
55
- */
56
- set keysym(keysym: number);
57
- /**
58
- * Gets whether the keysym value of this key event is reliable.
59
- */
60
- get reliable(): boolean;
61
- /**
62
- * Sets whether the keysym value of this key event is reliable.
63
- */
64
- set reliable(reliable: boolean);
65
- /**
66
- * Returns true if the given keysym corresponds to a printable character,
67
- * false otherwise.
68
- *
69
- * @returns {Boolean}
70
- * true if the given keysym corresponds to a printable character,
71
- * false otherwise.
72
- */
73
- isPrintable(): boolean;
74
- isControlCharacter(codepoint: number): boolean;
75
- keysymFromKeycode(keyCode: number, location: number): number;
76
- getKeysym(keysyms: Array<number>, location: number): number;
77
- keysymFromKeyIdentifier(identifier: any, location: any, shifted?: any): number;
78
- keyIdentifierSane(keyCode: number, keyIdentifier: string): boolean;
79
- }
@@ -1,324 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebXKeyEvent = void 0;
4
- const WebXKeyboardUtils_1 = require("./WebXKeyboardUtils");
5
- /**
6
- * A key event having a corresponding timestamp. This event is non-specific.
7
- * Its subclasses should be used instead when recording specific key
8
- * events.
9
- *
10
- * Base class for all keyboard events in the WebX client.
11
- *
12
- * This class provides common properties and methods for handling keyboard events.
13
- */
14
- class WebXKeyEvent {
15
- constructor() {
16
- /**
17
- * Whether the default action of this key event should be prevented.
18
- */
19
- this._defaultPrevented = false;
20
- /**
21
- * The keysym of the key associated with this key event, as determined
22
- * by a best-effort guess using available event properties and keyboard
23
- * state.
24
- */
25
- this._keysym = null;
26
- /**
27
- * Whether the keysym value of this key event is known to be reliable.
28
- * If false, the keysym may still be valid, but it's only a best guess,
29
- * and future key events may be a better source of information.
30
- */
31
- this._reliable = false;
32
- }
33
- /**
34
- * Gets whether the default action of this key event should be prevented.
35
- */
36
- get defaultPrevented() {
37
- return this._defaultPrevented;
38
- }
39
- /**
40
- * Sets whether the default action of this key event should be prevented.
41
- */
42
- set defaultPrevented(defaultPrevented) {
43
- this._defaultPrevented = defaultPrevented;
44
- }
45
- /**
46
- * Gets the keysym of the key associated with this key event.
47
- */
48
- get keysym() {
49
- return this._keysym;
50
- }
51
- /**
52
- * Sets the keysym of the key associated with this key event.
53
- */
54
- set keysym(keysym) {
55
- this._keysym = keysym;
56
- }
57
- /**
58
- * Gets whether the keysym value of this key event is reliable.
59
- */
60
- get reliable() {
61
- return this._reliable;
62
- }
63
- /**
64
- * Sets whether the keysym value of this key event is reliable.
65
- */
66
- set reliable(reliable) {
67
- this._reliable = reliable;
68
- }
69
- /**
70
- * Returns true if the given keysym corresponds to a printable character,
71
- * false otherwise.
72
- *
73
- * @returns {Boolean}
74
- * true if the given keysym corresponds to a printable character,
75
- * false otherwise.
76
- */
77
- isPrintable() {
78
- const keysym = this._keysym;
79
- // Keysyms with Unicode equivalents are printable
80
- return (keysym >= 0x00 && keysym <= 0xff) || (keysym & 0xffff0000) === 0x01000000;
81
- }
82
- isControlCharacter(codepoint) {
83
- return codepoint <= 0x1f || (codepoint >= 0x7f && codepoint <= 0x9f);
84
- }
85
- keysymFromKeycode(keyCode, location) {
86
- return this.getKeysym(WebXKeyEvent.keycodeKeysyms[keyCode], location);
87
- }
88
- getKeysym(keysyms, location) {
89
- if (!keysyms) {
90
- return null;
91
- }
92
- return keysyms[location] || keysyms[0];
93
- }
94
- keysymFromKeyIdentifier(identifier, location, shifted) {
95
- if (!identifier) {
96
- return null;
97
- }
98
- let typedCharacter;
99
- // If identifier is U+xxxx, decode Unicode character
100
- const unicodePrefixLocation = identifier.indexOf("U+");
101
- if (unicodePrefixLocation >= 0) {
102
- const hex = identifier.substring(unicodePrefixLocation + 2);
103
- typedCharacter = String.fromCharCode(parseInt(hex, 16));
104
- }
105
- // If single character and not keypad, use that as typed character
106
- else if (identifier.length === 1 && location !== 3) {
107
- typedCharacter = identifier;
108
- }
109
- // Otherwise, look up corresponding keysym
110
- else {
111
- return this.getKeysym(WebXKeyEvent.keyidentifier_keysym[identifier], location);
112
- }
113
- // Alter case if necessary
114
- if (shifted === true) {
115
- typedCharacter = typedCharacter.toUpperCase();
116
- }
117
- else if (shifted === false) {
118
- typedCharacter = typedCharacter.toLowerCase();
119
- }
120
- // Get codepoint
121
- const codepoint = typedCharacter.charCodeAt(0);
122
- return WebXKeyboardUtils_1.WebXKeyboardUtils.keysymFromCharCode(codepoint);
123
- }
124
- keyIdentifierSane(keyCode, keyIdentifier) {
125
- // Missing identifier is not sane
126
- if (!keyIdentifier) {
127
- return false;
128
- }
129
- // Assume non-Unicode keyIdentifier values are sane
130
- const unicodePrefixLocation = keyIdentifier.indexOf("U+");
131
- if (unicodePrefixLocation === -1) {
132
- return true;
133
- }
134
- // If the Unicode codepoint isn't identical to the keyCode,
135
- // then the identifier is likely correct
136
- const codepoint = parseInt(keyIdentifier.substring(unicodePrefixLocation + 2), 16);
137
- if (keyCode !== codepoint) {
138
- return true;
139
- }
140
- // The keyCodes for A-Z and 0-9 are actually identical to their
141
- // Unicode codepoints
142
- if ((keyCode >= 65 && keyCode <= 90) || (keyCode >= 48 && keyCode <= 57)) {
143
- return true;
144
- }
145
- // The keyIdentifier does NOT appear sane
146
- return false;
147
- }
148
- }
149
- exports.WebXKeyEvent = WebXKeyEvent;
150
- /**
151
- * Map of known JavaScript keyidentifiers which do not map to typable
152
- * characters to their unshifted X11 keysym equivalents.
153
- */
154
- WebXKeyEvent.keyidentifier_keysym = {
155
- Again: [0xff66],
156
- AllCandidates: [0xff3d],
157
- Alphanumeric: [0xff30],
158
- Alt: [0xffe9, 0xffe9, 0xfe03],
159
- Attn: [0xfd0e],
160
- AltGraph: [0xfe03],
161
- ArrowDown: [0xff54],
162
- ArrowLeft: [0xff51],
163
- ArrowRight: [0xff53],
164
- ArrowUp: [0xff52],
165
- Backspace: [0xff08],
166
- CapsLock: [0xffe5],
167
- Cancel: [0xff69],
168
- Clear: [0xff0b],
169
- Convert: [0xff21],
170
- Copy: [0xfd15],
171
- Crsel: [0xfd1c],
172
- CrSel: [0xfd1c],
173
- CodeInput: [0xff37],
174
- Compose: [0xff20],
175
- Control: [0xffe3, 0xffe3, 0xffe4],
176
- ContextMenu: [0xff67],
177
- Delete: [0xffff],
178
- Down: [0xff54],
179
- End: [0xff57],
180
- Enter: [0xff0d],
181
- EraseEof: [0xfd06],
182
- Escape: [0xff1b],
183
- Execute: [0xff62],
184
- Exsel: [0xfd1d],
185
- ExSel: [0xfd1d],
186
- F1: [0xffbe],
187
- F2: [0xffbf],
188
- F3: [0xffc0],
189
- F4: [0xffc1],
190
- F5: [0xffc2],
191
- F6: [0xffc3],
192
- F7: [0xffc4],
193
- F8: [0xffc5],
194
- F9: [0xffc6],
195
- F10: [0xffc7],
196
- F11: [0xffc8],
197
- F12: [0xffc9],
198
- F13: [0xffca],
199
- F14: [0xffcb],
200
- F15: [0xffcc],
201
- F16: [0xffcd],
202
- F17: [0xffce],
203
- F18: [0xffcf],
204
- F19: [0xffd0],
205
- F20: [0xffd1],
206
- F21: [0xffd2],
207
- F22: [0xffd3],
208
- F23: [0xffd4],
209
- F24: [0xffd5],
210
- Find: [0xff68],
211
- GroupFirst: [0xfe0c],
212
- GroupLast: [0xfe0e],
213
- GroupNext: [0xfe08],
214
- GroupPrevious: [0xfe0a],
215
- FullWidth: null,
216
- HalfWidth: null,
217
- HangulMode: [0xff31],
218
- Hankaku: [0xff29],
219
- HanjaMode: [0xff34],
220
- Help: [0xff6a],
221
- Hiragana: [0xff25],
222
- HiraganaKatakana: [0xff27],
223
- Home: [0xff50],
224
- Hyper: [0xffed, 0xffed, 0xffee],
225
- Insert: [0xff63],
226
- JapaneseHiragana: [0xff25],
227
- JapaneseKatakana: [0xff26],
228
- JapaneseRomaji: [0xff24],
229
- JunjaMode: [0xff38],
230
- KanaMode: [0xff2d],
231
- KanjiMode: [0xff21],
232
- Katakana: [0xff26],
233
- Left: [0xff51],
234
- Meta: [0xffe7, 0xffe7, 0xffe8],
235
- ModeChange: [0xff7e],
236
- NumLock: [0xff7f],
237
- PageDown: [0xff56],
238
- PageUp: [0xff55],
239
- Pause: [0xff13],
240
- Play: [0xfd16],
241
- PreviousCandidate: [0xff3e],
242
- PrintScreen: [0xff61],
243
- Redo: [0xff66],
244
- Right: [0xff53],
245
- RomanCharacters: null,
246
- Scroll: [0xff14],
247
- Select: [0xff60],
248
- Separator: [0xffac],
249
- Shift: [0xffe1, 0xffe1, 0xffe2],
250
- SingleCandidate: [0xff3c],
251
- Super: [0xffeb, 0xffeb, 0xffec],
252
- Tab: [0xff09],
253
- UIKeyInputDownArrow: [0xff54],
254
- UIKeyInputEscape: [0xff1b],
255
- UIKeyInputLeftArrow: [0xff51],
256
- UIKeyInputRightArrow: [0xff53],
257
- UIKeyInputUpArrow: [0xff52],
258
- Up: [0xff52],
259
- Undo: [0xff65],
260
- Win: [0xffeb],
261
- Zenkaku: [0xff28],
262
- ZenkakuHankaku: [0xff2a]
263
- };
264
- /**
265
- * Map of known JavaScript keycodes which do not map to typable characters
266
- * to their X11 keysym equivalents.
267
- */
268
- WebXKeyEvent.keycodeKeysyms = {
269
- 8: [0xff08], // backspace
270
- 9: [0xff09], // tab
271
- 12: [0xff0b, 0xff0b, 0xff0b, 0xffb5], // clear / KP 5
272
- 13: [0xff0d], // enter
273
- 16: [0xffe1, 0xffe1, 0xffe2], // shift
274
- 17: [0xffe3, 0xffe3, 0xffe4], // ctrl
275
- 18: [0xffe9, 0xffe9, 0xfe03], // alt
276
- 19: [0xff13], // pause/break
277
- 20: [0xffe5], // caps lock
278
- 27: [0xff1b], // escape
279
- 32: [0x0020], // space
280
- 33: [0xff55, 0xff55, 0xff55, 0xffb9], // page up / KP 9
281
- 34: [0xff56, 0xff56, 0xff56, 0xffb3], // page down / KP 3
282
- 35: [0xff57, 0xff57, 0xff57, 0xffb1], // end / KP 1
283
- 36: [0xff50, 0xff50, 0xff50, 0xffb7], // home / KP 7
284
- 37: [0xff51, 0xff51, 0xff51, 0xffb4], // left arrow / KP 4
285
- 38: [0xff52, 0xff52, 0xff52, 0xffb8], // up arrow / KP 8
286
- 39: [0xff53, 0xff53, 0xff53, 0xffb6], // right arrow / KP 6
287
- 40: [0xff54, 0xff54, 0xff54, 0xffb2], // down arrow / KP 2
288
- 45: [0xff63, 0xff63, 0xff63, 0xffb0], // insert / KP 0
289
- 46: [0xffff, 0xffff, 0xffff, 0xffae], // delete / KP decimal
290
- 91: [0xffeb], // left window key (hyper_l)
291
- 92: [0xff67], // right window key (menu key?)
292
- 93: null, // select key
293
- 96: [0xffb0], // KP 0
294
- 97: [0xffb1], // KP 1
295
- 98: [0xffb2], // KP 2
296
- 99: [0xffb3], // KP 3
297
- 100: [0xffb4], // KP 4
298
- 101: [0xffb5], // KP 5
299
- 102: [0xffb6], // KP 6
300
- 103: [0xffb7], // KP 7
301
- 104: [0xffb8], // KP 8
302
- 105: [0xffb9], // KP 9
303
- 106: [0xffaa], // KP multiply
304
- 107: [0xffab], // KP add
305
- 109: [0xffad], // KP subtract
306
- 110: [0xffae], // KP decimal
307
- 111: [0xffaf], // KP divide
308
- 112: [0xffbe], // f1
309
- 113: [0xffbf], // f2
310
- 114: [0xffc0], // f3
311
- 115: [0xffc1], // f4
312
- 116: [0xffc2], // f5
313
- 117: [0xffc3], // f6
314
- 118: [0xffc4], // f7
315
- 119: [0xffc5], // f8
316
- 120: [0xffc6], // f9
317
- 121: [0xffc7], // f10
318
- 122: [0xffc8], // f11
319
- 123: [0xffc9], // f12
320
- 144: [0xff7f], // num lock
321
- 145: [0xff14], // scroll lock
322
- 225: [0xfe03] // altgraph (iso_level3_shift)
323
- };
324
- //# sourceMappingURL=WebXKeyEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WebXKeyEvent.js","sourceRoot":"","sources":["../../../src/input/keyboard/WebXKeyEvent.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AAExD;;;;;;;;GAQG;AACH,MAAsB,YAAY;IAAlC;QAkLE;;WAEG;QACO,sBAAiB,GAAG,KAAK,CAAC;QAEpC;;;;WAIG;QACO,YAAO,GAAW,IAAI,CAAC;QAEjC;;;;WAIG;QACO,cAAS,GAAG,KAAK,CAAC;IAmJ9B,CAAC;IAjJC;;OAEG;IACH,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,gBAAgB,CAAC,gBAAyB;QACnD,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAW,MAAM,CAAC,MAAc;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ,CAAC,QAAiB;QACnC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED;;;;;;;OAOG;IACI,WAAW;QAChB,MAAM,MAAM,GAAG,I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the WebX client.
4
- *
5
- * This event is associated with a printable character and contains information
6
- * about the character code and its corresponding keysym.
7
- */
8
- export declare class WebXKeyPressEvent extends WebXKeyEvent {
9
- private _charCode;
10
- /**
11
- * Gets the character code associated with this key press event.
12
- *
13
- * The character code represents the Unicode value of the pressed key.
14
- *
15
- * @returns The character code.
16
- */
17
- get charCode(): number;
18
- /**
19
- * Sets the character code for this key press event.
20
- *
21
- * @param charCode The character code to set.
22
- */
23
- set charCode(charCode: number);
24
- /**
25
- * Constructs a new WebXKeyPressEvent.
26
- *
27
- * @param charCode The character code of the pressed key.
28
- */
29
- constructor(charCode: number);
30
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebXKeyPressEvent = void 0;
4
- const WebXKeyEvent_1 = require("./WebXKeyEvent");
5
- const WebXKeyboardUtils_1 = require("./WebXKeyboardUtils");
6
- /**
7
- * Represents a key press event in the WebX client.
8
- *
9
- * This event is associated with a printable character and contains information
10
- * about the character code and its corresponding keysym.
11
- */
12
- class WebXKeyPressEvent extends WebXKeyEvent_1.WebXKeyEvent {
13
- /**
14
- * Gets the character code associated with this key press event.
15
- *
16
- * The character code represents the Unicode value of the pressed key.
17
- *
18
- * @returns The character code.
19
- */
20
- get charCode() {
21
- return this._charCode;
22
- }
23
- /**
24
- * Sets the character code for this key press event.
25
- *
26
- * @param charCode The character code to set.
27
- */
28
- set charCode(charCode) {
29
- this._charCode = charCode;
30
- }
31
- /**
32
- * Constructs a new WebXKeyPressEvent.
33
- *
34
- * @param charCode The character code of the pressed key.
35
- */
36
- constructor(charCode) {
37
- super();
38
- this.charCode = charCode;
39
- this.keysym = WebXKeyboardUtils_1.WebXKeyboardUtils.keysymFromCharCode(charCode);
40
- this.reliable = true;
41
- }
42
- }
43
- exports.WebXKeyPressEvent = WebXKeyPressEvent;
44
- //# sourceMappingURL=WebXKeyPressEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WebXKeyPressEvent.js","sourceRoot":"","sources":["../../../src/input/keyboard/WebXKeyPressEvent.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAC9C,2DAAwD;AAExD;;;;;GAKG;AACH,MAAa,iBAAkB,SAAQ,2BAAY;IAGjD;;;;;;OAMG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,IAAW,QAAQ,CAAC,QAAgB;QAClC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,YAAY,QAAgB;QAC1B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,qCAAiB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAC7D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;CACF;AAlCD,8CAkCC"}
@@ -1,33 +0,0 @@
1
- import { WebXKeyEvent } from './WebXKeyEvent';
2
- /**
3
- * Represents a keyup event in the WebX client.
4
- *
5
- * This event is triggered when a key is released.
6
- */
7
- export declare class WebXKeyUpEvent extends WebXKeyEvent {
8
- /**
9
- * The key code of the released key.
10
- */
11
- readonly keyCode: number;
12
- /**
13
- * The key of the released key.
14
- */
15
- readonly key: string;
16
- /**
17
- * The location of the released key.
18
- */
19
- readonly location: number;
20
- /**
21
- * The key identifier of the released key.
22
- */
23
- readonly keyIdentifier: string;
24
- /**
25
- * Constructs a new WebXKeyUpEvent.
26
- *
27
- * @param keyCode The key code of the released key.
28
- * @param keyIdentifier The key identifier of the released key.
29
- * @param key The key of the released key.
30
- * @param location The location of the released key.
31
- */
32
- constructor(keyCode: number, keyIdentifier: string, key: string, location: number);
33
- }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebXKeyUpEvent = void 0;
4
- const WebXKeyEvent_1 = require("./WebXKeyEvent");
5
- /**
6
- * Represents a keyup event in the WebX client.
7
- *
8
- * This event is triggered when a key is released.
9
- */
10
- class WebXKeyUpEvent extends WebXKeyEvent_1.WebXKeyEvent {
11
- /**
12
- * Constructs a new WebXKeyUpEvent.
13
- *
14
- * @param keyCode The key code of the released key.
15
- * @param keyIdentifier The key identifier of the released key.
16
- * @param key The key of the released key.
17
- * @param location The location of the released key.
18
- */
19
- constructor(keyCode, keyIdentifier, key, location) {
20
- super();
21
- this.keyCode = keyCode;
22
- this.key = key;
23
- this.location = location;
24
- this.keyIdentifier = keyIdentifier;
25
- this._keysym = this.keysymFromKeycode(keyCode, location) || this.keysymFromKeyIdentifier(key, location);
26
- // Keyup is as reliable as it will ever be
27
- this.reliable = true;
28
- }
29
- }
30
- exports.WebXKeyUpEvent = WebXKeyUpEvent;
31
- //# sourceMappingURL=WebXKeyUpEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WebXKeyUpEvent.js","sourceRoot":"","sources":["../../../src/input/keyboard/WebXKeyUpEvent.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAE9C;;;;GAIG;AACH,MAAa,cAAe,SAAQ,2BAAY;IAsB9C;;;;;;;OAOG;IACH,YAAY,OAAe,EAAE,aAAqB,EAAE,GAAW,EAAE,QAAgB;QAC/E,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,uBAAuB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAExG,0CAA0C;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IAEvB,CAAC;CACF;AA1CD,wCA0CC"}
@@ -1,108 +0,0 @@
1
- /**
2
- * Represents the state of keyboard modifiers (e.g., Shift, Ctrl, Alt).
3
- *
4
- * This class tracks the state of each modifier key and provides methods
5
- * to update and retrieve the state.
6
- */
7
- export declare class WebXKeyboardModifierState {
8
- /**
9
- * Whether the Shift key is pressed.
10
- */
11
- private _shift;
12
- /**
13
- * Whether the Ctrl key is pressed.
14
- */
15
- private _ctrl;
16
- /**
17
- * Whether the Alt key is pressed.
18
- */
19
- private _alt;
20
- /**
21
- * Whether the Meta key (e.g., Command on macOS) is pressed.
22
- */
23
- private _meta;
24
- /**
25
- * Whether the Hyper key is pressed.
26
- */
27
- private _hyper;
28
- /**
29
- * Gets whether the Shift key is pressed.
30
- *
31
- * @returns True if the Shift key is pressed, false otherwise.
32
- */
33
- get shift(): boolean;
34
- /**
35
- * Sets whether the Shift key is pressed.
36
- *
37
- * @param value True to indicate the Shift key is pressed, false otherwise.
38
- */
39
- set shift(value: boolean);
40
- /**
41
- * Gets whether the Ctrl key is pressed.
42
- *
43
- * @returns True if the Ctrl key is pressed, false otherwise.
44
- */
45
- get ctrl(): boolean;
46
- /**
47
- * Sets whether the Ctrl key is pressed.
48
- *
49
- * @param value True to indicate the Ctrl key is pressed, false otherwise.
50
- */
51
- set ctrl(value: boolean);
52
- /**
53
- * Gets whether the Alt key is pressed.
54
- *
55
- * @returns True if the Alt key is pressed, false otherwise.
56
- */
57
- get alt(): boolean;
58
- /**
59
- * Sets whether the Alt key is pressed.
60
- *
61
- * @param value True to indicate the Alt key is pressed, false otherwise.
62
- */
63
- set alt(value: boolean);
64
- /**
65
- * Gets whether the Meta key (e.g., Command on macOS) is pressed.
66
- *
67
- * @returns True if the Meta key is pressed, false otherwise.
68
- */
69
- get meta(): boolean;
70
- /**
71
- * Sets whether the Meta key (e.g., Command on macOS) is pressed.
72
- *
73
- * @param value True to indicate the Meta key is pressed, false otherwise.
74
- */
75
- set meta(value: boolean);
76
- /**
77
- * Gets whether the Hyper key is pressed.
78
- *
79
- * @returns True if the Hyper key is pressed, false otherwise.
80
- */
81
- get hyper(): boolean;
82
- /**
83
- * Sets whether the Hyper key is pressed.
84
- *
85
- * @param value True to indicate the Hyper key is pressed, false otherwise.
86
- */
87
- set hyper(value: boolean);
88
- /**
89
- * Creates a new instance of WebXKeyboardModifierState.
90
- *
91
- * @param state Optional initial state of the keyboard modifiers.
92
- * Contains the state of Shift, Ctrl, Alt, Meta, and Hyper keys.
93
- */
94
- constructor(state?: {
95
- shift: boolean;
96
- ctrl: boolean;
97
- alt: boolean;
98
- meta: boolean;
99
- hyper: boolean;
100
- });
101
- /**
102
- * Updates the modifier state based on a keyboard event.
103
- *
104
- * @param event The keyboard event to process.
105
- * @returns The updated modifier state.
106
- */
107
- fromKeyboardEvent(event: KeyboardEvent): this;
108
- }