@illgrenoble/webx-client 1.8.1 → 1.9.1
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.
- package/README.md +1 -1
- package/dist/WebXClient.d.ts +0 -1
- package/dist/WebXClient.js +8 -3
- package/dist/WebXClient.js.map +1 -1
- package/dist/WebXEngine.d.ts +4 -0
- package/dist/WebXEngine.js +7 -0
- package/dist/WebXEngine.js.map +1 -0
- package/dist/display/WebXCursor.d.ts +1 -0
- package/dist/display/WebXCursor.js +9 -0
- package/dist/display/WebXCursor.js.map +1 -1
- package/dist/display/WebXDisplay.d.ts +18 -0
- package/dist/display/WebXDisplay.js +47 -4
- package/dist/display/WebXDisplay.js.map +1 -1
- package/dist/display/WebXMaterial.d.ts +14 -0
- package/dist/display/WebXMaterial.js +140 -0
- package/dist/display/WebXMaterial.js.map +1 -0
- package/dist/display/WebXMaterialProvider.d.ts +8 -0
- package/dist/display/WebXMaterialProvider.js +71 -0
- package/dist/display/WebXMaterialProvider.js.map +1 -0
- package/dist/display/WebXTextureFactory.d.ts +10 -0
- package/dist/display/WebXTextureFactory.js +21 -0
- package/dist/display/WebXTextureFactory.js.map +1 -1
- package/dist/display/WebXWindow.d.ts +32 -0
- package/dist/display/WebXWindow.js +84 -6
- package/dist/display/WebXWindow.js.map +1 -1
- package/dist/display/WebXWindowProperties.d.ts +5 -0
- package/dist/display/WebXWindowProperties.js +1 -0
- package/dist/display/WebXWindowProperties.js.map +1 -1
- package/dist/input/GuacamoleKeyboard.js +1532 -0
- package/dist/input/WebXKeyboard.d.ts +10 -232
- package/dist/input/WebXKeyboard.js +31 -594
- package/dist/input/WebXKeyboard.js.map +1 -1
- package/dist/input/WebXNewKeyboard.d.ts +62 -0
- package/dist/input/WebXNewKeyboard.js +94 -0
- package/dist/input/WebXNewKeyboard.js.map +1 -0
- package/dist/input/index.d.ts +0 -1
- package/dist/input/index.js +0 -1
- package/dist/input/index.js.map +1 -1
- package/dist/input/keyboard/WebXKeyboardUtils.js +1 -2
- package/dist/input/keyboard/WebXKeyboardUtils.js.map +1 -1
- package/dist/instruction/WebXInstructionType.d.ts +5 -1
- package/dist/instruction/WebXInstructionType.js +6 -0
- package/dist/instruction/WebXInstructionType.js.map +1 -1
- package/dist/instruction/WebXShapeInstruction.d.ts +18 -0
- package/dist/instruction/WebXShapeInstruction.js +23 -0
- package/dist/instruction/WebXShapeInstruction.js.map +1 -0
- package/dist/instruction/index.d.ts +1 -0
- package/dist/instruction/index.js +1 -0
- package/dist/instruction/index.js.map +1 -1
- package/dist/lib/GuacamoleKeyboard.js +1290 -0
- package/dist/lib/GuacamoleKeyboard.js.map +1 -0
- package/dist/message/WebXMessageType.d.ts +5 -1
- package/dist/message/WebXMessageType.js +4 -0
- package/dist/message/WebXMessageType.js.map +1 -1
- package/dist/message/WebXShapeMessage.d.ts +31 -0
- package/dist/message/WebXShapeMessage.js +29 -0
- package/dist/message/WebXShapeMessage.js.map +1 -0
- package/dist/message/index.d.ts +1 -0
- package/dist/message/index.js +1 -0
- package/dist/message/index.js.map +1 -1
- package/dist/src/WebXClient.d.ts +261 -0
- package/dist/src/WebXClient.js +571 -0
- package/dist/src/WebXClient.js.map +1 -0
- package/dist/src/WebXEngine.d.ts +4 -0
- package/dist/src/WebXEngine.js +7 -0
- package/dist/src/WebXEngine.js.map +1 -0
- package/dist/src/display/WebXCursor.d.ts +88 -0
- package/dist/src/display/WebXCursor.js +150 -0
- package/dist/src/display/WebXCursor.js.map +1 -0
- package/dist/src/display/WebXCursorFactory.d.ts +36 -0
- package/dist/src/display/WebXCursorFactory.js +59 -0
- package/dist/src/display/WebXCursorFactory.js.map +1 -0
- package/dist/src/display/WebXDisplay.d.ts +226 -0
- package/dist/src/display/WebXDisplay.js +424 -0
- package/dist/src/display/WebXDisplay.js.map +1 -0
- package/dist/src/display/WebXMaterial.d.ts +14 -0
- package/dist/src/display/WebXMaterial.js +140 -0
- package/dist/src/display/WebXMaterial.js.map +1 -0
- package/dist/src/display/WebXSubImage.d.ts +50 -0
- package/dist/src/display/WebXSubImage.js +26 -0
- package/dist/src/display/WebXSubImage.js.map +1 -0
- package/dist/src/display/WebXTextureFactory.d.ts +54 -0
- package/dist/src/display/WebXTextureFactory.js +160 -0
- package/dist/src/display/WebXTextureFactory.js.map +1 -0
- package/dist/src/display/WebXWindow.d.ts +241 -0
- package/dist/src/display/WebXWindow.js +438 -0
- package/dist/src/display/WebXWindow.js.map +1 -0
- package/dist/src/display/WebXWindowProperties.d.ts +44 -0
- package/dist/src/display/WebXWindowProperties.js +25 -0
- package/dist/src/display/WebXWindowProperties.js.map +1 -0
- package/dist/src/display/index.d.ts +7 -0
- package/dist/src/display/index.js +24 -0
- package/dist/src/display/index.js.map +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.js +24 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/input/WebXKeyboard.d.ts +265 -0
- package/dist/src/input/WebXKeyboard.js +632 -0
- package/dist/src/input/WebXKeyboard.js.map +1 -0
- package/dist/src/input/WebXMouse.d.ts +125 -0
- package/dist/src/input/WebXMouse.js +231 -0
- package/dist/src/input/WebXMouse.js.map +1 -0
- package/dist/src/input/index.d.ts +4 -0
- package/dist/src/input/index.js +21 -0
- package/dist/src/input/index.js.map +1 -0
- package/dist/src/input/keyboard/WebXKeyEvent.d.ts +79 -0
- package/dist/src/input/keyboard/WebXKeyEvent.js +324 -0
- package/dist/src/input/keyboard/WebXKeyEvent.js.map +1 -0
- package/dist/src/input/keyboard/WebXKeyPressEvent.d.ts +30 -0
- package/dist/src/input/keyboard/WebXKeyPressEvent.js +44 -0
- package/dist/src/input/keyboard/WebXKeyPressEvent.js.map +1 -0
- package/dist/src/input/keyboard/WebXKeyUpEvent.d.ts +33 -0
- package/dist/src/input/keyboard/WebXKeyUpEvent.js +31 -0
- package/dist/src/input/keyboard/WebXKeyUpEvent.js.map +1 -0
- package/dist/src/input/keyboard/WebXKeyboardModifierState.d.ts +108 -0
- package/dist/src/input/keyboard/WebXKeyboardModifierState.js +148 -0
- package/dist/src/input/keyboard/WebXKeyboardModifierState.js.map +1 -0
- package/dist/src/input/keyboard/WebXKeyboardUtils.d.ts +25 -0
- package/dist/src/input/keyboard/WebXKeyboardUtils.js +63 -0
- package/dist/src/input/keyboard/WebXKeyboardUtils.js.map +1 -0
- package/dist/src/input/keyboard/WebXKeydownEvent.d.ts +46 -0
- package/dist/src/input/keyboard/WebXKeydownEvent.js +66 -0
- package/dist/src/input/keyboard/WebXKeydownEvent.js.map +1 -0
- package/dist/src/input/keyboard/index.d.ts +6 -0
- package/dist/src/input/keyboard/index.js +23 -0
- package/dist/src/input/keyboard/index.js.map +1 -0
- package/dist/src/input/mouse/WebXMouseState.d.ts +190 -0
- package/dist/src/input/mouse/WebXMouseState.js +217 -0
- package/dist/src/input/mouse/WebXMouseState.js.map +1 -0
- package/dist/src/input/mouse/index.d.ts +1 -0
- package/dist/src/input/mouse/index.js +18 -0
- package/dist/src/input/mouse/index.js.map +1 -0
- package/dist/src/instruction/WebXClipboardInstruction.d.ts +18 -0
- package/dist/src/instruction/WebXClipboardInstruction.js +23 -0
- package/dist/src/instruction/WebXClipboardInstruction.js.map +1 -0
- package/dist/src/instruction/WebXConnectInstruction.d.ts +19 -0
- package/dist/src/instruction/WebXConnectInstruction.js +24 -0
- package/dist/src/instruction/WebXConnectInstruction.js.map +1 -0
- package/dist/src/instruction/WebXCursorImageInstruction.d.ts +18 -0
- package/dist/src/instruction/WebXCursorImageInstruction.js +23 -0
- package/dist/src/instruction/WebXCursorImageInstruction.js.map +1 -0
- package/dist/src/instruction/WebXDataAckInstruction.d.ts +25 -0
- package/dist/src/instruction/WebXDataAckInstruction.js +26 -0
- package/dist/src/instruction/WebXDataAckInstruction.js.map +1 -0
- package/dist/src/instruction/WebXImageInstruction.d.ts +18 -0
- package/dist/src/instruction/WebXImageInstruction.js +23 -0
- package/dist/src/instruction/WebXImageInstruction.js.map +1 -0
- package/dist/src/instruction/WebXInstruction.d.ts +29 -0
- package/dist/src/instruction/WebXInstruction.js +28 -0
- package/dist/src/instruction/WebXInstruction.js.map +1 -0
- package/dist/src/instruction/WebXInstructionResponse.d.ts +66 -0
- package/dist/src/instruction/WebXInstructionResponse.js +78 -0
- package/dist/src/instruction/WebXInstructionResponse.js.map +1 -0
- package/dist/src/instruction/WebXInstructionType.d.ts +63 -0
- package/dist/src/instruction/WebXInstructionType.js +96 -0
- package/dist/src/instruction/WebXInstructionType.js.map +1 -0
- package/dist/src/instruction/WebXKeyboardInstruction.d.ts +23 -0
- package/dist/src/instruction/WebXKeyboardInstruction.js +25 -0
- package/dist/src/instruction/WebXKeyboardInstruction.js.map +1 -0
- package/dist/src/instruction/WebXMouseInstruction.d.ts +28 -0
- package/dist/src/instruction/WebXMouseInstruction.js +27 -0
- package/dist/src/instruction/WebXMouseInstruction.js.map +1 -0
- package/dist/src/instruction/WebXPongInstruction.d.ts +18 -0
- package/dist/src/instruction/WebXPongInstruction.js +23 -0
- package/dist/src/instruction/WebXPongInstruction.js.map +1 -0
- package/dist/src/instruction/WebXQualityInstruction.d.ts +19 -0
- package/dist/src/instruction/WebXQualityInstruction.js +24 -0
- package/dist/src/instruction/WebXQualityInstruction.js.map +1 -0
- package/dist/src/instruction/WebXScreenInstruction.d.ts +12 -0
- package/dist/src/instruction/WebXScreenInstruction.js +20 -0
- package/dist/src/instruction/WebXScreenInstruction.js.map +1 -0
- package/dist/src/instruction/WebXShapeInstruction.d.ts +18 -0
- package/dist/src/instruction/WebXShapeInstruction.js +23 -0
- package/dist/src/instruction/WebXShapeInstruction.js.map +1 -0
- package/dist/src/instruction/WebXWindowsInstruction.d.ts +13 -0
- package/dist/src/instruction/WebXWindowsInstruction.js +21 -0
- package/dist/src/instruction/WebXWindowsInstruction.js.map +1 -0
- package/dist/src/instruction/index.d.ts +15 -0
- package/dist/src/instruction/index.js +32 -0
- package/dist/src/instruction/index.js.map +1 -0
- package/dist/src/message/WebXClipboardMessage.d.ts +19 -0
- package/dist/src/message/WebXClipboardMessage.js +23 -0
- package/dist/src/message/WebXClipboardMessage.js.map +1 -0
- package/dist/src/message/WebXConnectionMessage.d.ts +12 -0
- package/dist/src/message/WebXConnectionMessage.js +20 -0
- package/dist/src/message/WebXConnectionMessage.js.map +1 -0
- package/dist/src/message/WebXCursorImageMessage.d.ts +46 -0
- package/dist/src/message/WebXCursorImageMessage.js +35 -0
- package/dist/src/message/WebXCursorImageMessage.js.map +1 -0
- package/dist/src/message/WebXImageMessage.d.ts +41 -0
- package/dist/src/message/WebXImageMessage.js +33 -0
- package/dist/src/message/WebXImageMessage.js.map +1 -0
- package/dist/src/message/WebXMessage.d.ts +24 -0
- package/dist/src/message/WebXMessage.js +23 -0
- package/dist/src/message/WebXMessage.js.map +1 -0
- package/dist/src/message/WebXMessageType.d.ts +59 -0
- package/dist/src/message/WebXMessageType.js +64 -0
- package/dist/src/message/WebXMessageType.js.map +1 -0
- package/dist/src/message/WebXMouseMessage.d.ts +30 -0
- package/dist/src/message/WebXMouseMessage.js +29 -0
- package/dist/src/message/WebXMouseMessage.js.map +1 -0
- package/dist/src/message/WebXNopMessage.d.ts +10 -0
- package/dist/src/message/WebXNopMessage.js +18 -0
- package/dist/src/message/WebXNopMessage.js.map +1 -0
- package/dist/src/message/WebXPingMessage.d.ts +13 -0
- package/dist/src/message/WebXPingMessage.js +21 -0
- package/dist/src/message/WebXPingMessage.js.map +1 -0
- package/dist/src/message/WebXQualityMessage.d.ts +39 -0
- package/dist/src/message/WebXQualityMessage.js +32 -0
- package/dist/src/message/WebXQualityMessage.js.map +1 -0
- package/dist/src/message/WebXScreenMessage.d.ts +37 -0
- package/dist/src/message/WebXScreenMessage.js +29 -0
- package/dist/src/message/WebXScreenMessage.js.map +1 -0
- package/dist/src/message/WebXShapeMessage.d.ts +31 -0
- package/dist/src/message/WebXShapeMessage.js +29 -0
- package/dist/src/message/WebXShapeMessage.js.map +1 -0
- package/dist/src/message/WebXSubImagesMessage.d.ts +31 -0
- package/dist/src/message/WebXSubImagesMessage.js +29 -0
- package/dist/src/message/WebXSubImagesMessage.js.map +1 -0
- package/dist/src/message/WebXWindowsMessage.d.ts +21 -0
- package/dist/src/message/WebXWindowsMessage.js +25 -0
- package/dist/src/message/WebXWindowsMessage.js.map +1 -0
- package/dist/src/message/index.d.ts +14 -0
- package/dist/src/message/index.js +31 -0
- package/dist/src/message/index.js.map +1 -0
- package/dist/src/tracer/WebXDebugImageMessageHandler.d.ts +48 -0
- package/dist/src/tracer/WebXDebugImageMessageHandler.js +102 -0
- package/dist/src/tracer/WebXDebugImageMessageHandler.js.map +1 -0
- package/dist/src/tracer/WebXHandler.d.ts +14 -0
- package/dist/src/tracer/WebXHandler.js +3 -0
- package/dist/src/tracer/WebXHandler.js.map +1 -0
- package/dist/src/tracer/WebXInstructionHandler.d.ts +21 -0
- package/dist/src/tracer/WebXInstructionHandler.js +13 -0
- package/dist/src/tracer/WebXInstructionHandler.js.map +1 -0
- package/dist/src/tracer/WebXMessageHandler.d.ts +21 -0
- package/dist/src/tracer/WebXMessageHandler.js +13 -0
- package/dist/src/tracer/WebXMessageHandler.js.map +1 -0
- package/dist/src/tracer/WebXStatsHandler.d.ts +23 -0
- package/dist/src/tracer/WebXStatsHandler.js +13 -0
- package/dist/src/tracer/WebXStatsHandler.js.map +1 -0
- package/dist/src/tracer/index.d.ts +5 -0
- package/dist/src/tracer/index.js +22 -0
- package/dist/src/tracer/index.js.map +1 -0
- package/dist/src/transport/WebXBinarySerializer.d.ts +31 -0
- package/dist/src/transport/WebXBinarySerializer.js +63 -0
- package/dist/src/transport/WebXBinarySerializer.js.map +1 -0
- package/dist/src/transport/WebXInstructionBuffer.d.ts +55 -0
- package/dist/src/transport/WebXInstructionBuffer.js +109 -0
- package/dist/src/transport/WebXInstructionBuffer.js.map +1 -0
- package/dist/src/transport/WebXInstructionEncoder.d.ts +181 -0
- package/dist/src/transport/WebXInstructionEncoder.js +294 -0
- package/dist/src/transport/WebXInstructionEncoder.js.map +1 -0
- package/dist/src/transport/WebXMessageBuffer.d.ts +80 -0
- package/dist/src/transport/WebXMessageBuffer.js +104 -0
- package/dist/src/transport/WebXMessageBuffer.js.map +1 -0
- package/dist/src/transport/WebXMessageDecoder.d.ts +108 -0
- package/dist/src/transport/WebXMessageDecoder.js +332 -0
- package/dist/src/transport/WebXMessageDecoder.js.map +1 -0
- package/dist/src/transport/index.d.ts +5 -0
- package/dist/src/transport/index.js +22 -0
- package/dist/src/transport/index.js.map +1 -0
- package/dist/src/tunnel/WebXTunnel.d.ts +93 -0
- package/dist/src/tunnel/WebXTunnel.js +156 -0
- package/dist/src/tunnel/WebXTunnel.js.map +1 -0
- package/dist/src/tunnel/WebXWebSocketTunnel.d.ts +40 -0
- package/dist/src/tunnel/WebXWebSocketTunnel.js +88 -0
- package/dist/src/tunnel/WebXWebSocketTunnel.js.map +1 -0
- package/dist/src/tunnel/index.d.ts +2 -0
- package/dist/src/tunnel/index.js +19 -0
- package/dist/src/tunnel/index.js.map +1 -0
- package/dist/src/utils/WebXColorGenerator.d.ts +24 -0
- package/dist/src/utils/WebXColorGenerator.js +46 -0
- package/dist/src/utils/WebXColorGenerator.js.map +1 -0
- package/dist/src/utils/WebXVersion.d.ts +34 -0
- package/dist/src/utils/WebXVersion.js +25 -0
- package/dist/src/utils/WebXVersion.js.map +1 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/index.js +19 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/tracer/WebXDebugImageMessageHandler.js +1 -0
- package/dist/tracer/WebXDebugImageMessageHandler.js.map +1 -1
- package/dist/transport/WebXInstructionEncoder.d.ts +14 -0
- package/dist/transport/WebXInstructionEncoder.js +23 -0
- package/dist/transport/WebXInstructionEncoder.js.map +1 -1
- package/dist/transport/WebXMessageDecoder.d.ts +7 -0
- package/dist/transport/WebXMessageDecoder.js +34 -3
- package/dist/transport/WebXMessageDecoder.js.map +1 -1
- package/dist/utils/WebXVersion.d.ts +4 -0
- package/dist/utils/WebXVersion.js +1 -0
- package/dist/utils/WebXVersion.js.map +1 -1
- package/package.json +5 -3
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { WebXKeyboardModifierState } from './keyboard';
|
|
2
1
|
/**
|
|
3
2
|
* Represents the keyboard input device in the WebX client.
|
|
4
3
|
*
|
|
@@ -6,83 +5,14 @@ import { WebXKeyboardModifierState } from './keyboard';
|
|
|
6
5
|
* and provides methods to interact with the keyboard state.
|
|
7
6
|
*/
|
|
8
7
|
export declare class WebXKeyboard {
|
|
9
|
-
private
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Set of known platform-specific or browser-specific quirks which must be
|
|
16
|
-
* accounted for to properly interpret key events, even if the only way to
|
|
17
|
-
* reliably detect that quirk is to platform/browser-sniff.
|
|
18
|
-
*/
|
|
19
|
-
static quirks: {
|
|
20
|
-
/**
|
|
21
|
-
* Whether keyup events are universally unreliable.
|
|
22
|
-
*/
|
|
23
|
-
keyupUnreliable: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Whether the Alt key is actually a modifier for typable keys and is
|
|
26
|
-
* thus never used for keyboard shortcuts.
|
|
27
|
-
*/
|
|
28
|
-
altIsTypableOnly: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Whether we can rely on receiving a keyup event for the Caps Lock
|
|
31
|
-
* key.
|
|
32
|
-
*/
|
|
33
|
-
capsLockKeyupUnreliable: boolean;
|
|
34
|
-
};
|
|
35
|
-
private readonly _keyboardId;
|
|
36
|
-
private readonly _eventMarker;
|
|
37
|
-
/**
|
|
38
|
-
* The element to use to provide keyboard events
|
|
39
|
-
*/
|
|
40
|
-
private readonly _element;
|
|
41
|
-
/**
|
|
42
|
-
* The state of every key, indexed by keysym. If a particular key is
|
|
43
|
-
* pressed, the value of pressed for that keysym will be true. If a key
|
|
44
|
-
* is not currently pressed, it will not be defined.
|
|
45
|
-
*/
|
|
46
|
-
private _pressed;
|
|
47
|
-
/**
|
|
48
|
-
* The state of every key, indexed by keysym, for strictly those keys whose
|
|
49
|
-
* status has been indirectly determined through observation of other key
|
|
50
|
-
* events. If a particular key is implicitly pressed, the value of
|
|
51
|
-
* implicitlyPressed for that keysym will be true. If a key
|
|
52
|
-
* is not currently implicitly pressed (the key is not pressed OR the state
|
|
53
|
-
* of the key is explicitly known), it will not be defined.
|
|
54
|
-
*/
|
|
55
|
-
private _implicitlyPressed;
|
|
56
|
-
/**
|
|
57
|
-
* The last result of calling the onkeydown handler for each key, indexed
|
|
58
|
-
* by keysym. This is used to prevent/allow default actions for key events,
|
|
59
|
-
* even when the onkeydown handler cannot be called again because the key
|
|
60
|
-
* is (theoretically) still pressed.
|
|
61
|
-
*/
|
|
62
|
-
private _lastKeydownResult;
|
|
63
|
-
/**
|
|
64
|
-
* The keysym most recently associated with a given keycode when keydown
|
|
65
|
-
* fired. This object maps keycodes to keysyms.
|
|
66
|
-
*/
|
|
67
|
-
private _recentKeysym;
|
|
68
|
-
/**
|
|
69
|
-
* Timeout before key repeat starts.
|
|
70
|
-
*/
|
|
71
|
-
private _keyRepeatTimeout;
|
|
72
|
-
/**
|
|
73
|
-
* Interval which presses and releases the last key pressed while that
|
|
74
|
-
* key is still being held down.
|
|
75
|
-
*/
|
|
76
|
-
private _keyRepeatInterval;
|
|
77
|
-
private _events;
|
|
78
|
-
private _keyDownHandler;
|
|
79
|
-
private _keyPressHandler;
|
|
80
|
-
private _keyUpHandler;
|
|
81
|
-
get pressed(): {
|
|
82
|
-
[index: number]: boolean;
|
|
83
|
-
};
|
|
8
|
+
private _keyboard;
|
|
9
|
+
private _onKeyDown;
|
|
10
|
+
private _onKeyUp;
|
|
11
|
+
set onKeyDown(onKeyDown: (key: any) => void);
|
|
12
|
+
set onKeyUp(onKeyUp: (key: any) => void);
|
|
84
13
|
/**
|
|
85
14
|
* Constructs a new WebXKeyboard instance.
|
|
15
|
+
* This creates a Guacamole.Keyboard instance and attaches event listeners.
|
|
86
16
|
*
|
|
87
17
|
* @param element The HTML element to attach the keyboard events to.
|
|
88
18
|
*/
|
|
@@ -92,174 +22,22 @@ export declare class WebXKeyboard {
|
|
|
92
22
|
*/
|
|
93
23
|
dispose(): void;
|
|
94
24
|
/**
|
|
95
|
-
*
|
|
96
|
-
|
|
97
|
-
private _handleQuirks;
|
|
98
|
-
/**
|
|
99
|
-
* Adds a keyboard event to the internal event queue.
|
|
100
|
-
*
|
|
101
|
-
* @param event The keyboard event to add.
|
|
102
|
-
*/
|
|
103
|
-
private _addEvent;
|
|
104
|
-
/**
|
|
105
|
-
* Bind the keyboard listeners to the given element
|
|
106
|
-
*/
|
|
107
|
-
private _bindListeners;
|
|
108
|
-
/**
|
|
109
|
-
* Unbinds the keyboard listeners from the associated element.
|
|
110
|
-
*/
|
|
111
|
-
private _unbindListeners;
|
|
112
|
-
/**
|
|
113
|
-
* Handles the keydown event by interpreting and processing it.
|
|
114
|
-
*
|
|
115
|
-
* @param event The keyboard event to handle.
|
|
116
|
-
*/
|
|
117
|
-
private _bindKeyDownListener;
|
|
118
|
-
/**
|
|
119
|
-
* Handles the keypress event by interpreting and processing it.
|
|
120
|
-
*
|
|
121
|
-
* @param event The keyboard event to handle.
|
|
122
|
-
*/
|
|
123
|
-
private _bindKeyPressListener;
|
|
124
|
-
/**
|
|
125
|
-
* Handles the keyup event by interpreting and processing it.
|
|
126
|
-
*
|
|
127
|
-
* @param event The keyboard event to handle.
|
|
128
|
-
*/
|
|
129
|
-
private _bindKeyUpListener;
|
|
130
|
-
/**
|
|
131
|
-
* Returns the keyboard location of the key associated with the given
|
|
132
|
-
* keyboard event. The location differentiates key events which otherwise
|
|
133
|
-
* have the same keycode, such as left shift vs. right shift.
|
|
134
|
-
*
|
|
135
|
-
* @param event A JavaScript keyboard event, as received through the DOM via a "keydown", "keyup", or "keypress" handler.
|
|
136
|
-
*
|
|
137
|
-
* @returns {number}
|
|
138
|
-
* The location of the key event on the keyboard, as defined at:
|
|
139
|
-
* http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
|
|
140
|
-
*/
|
|
141
|
-
private static _getEventLocation;
|
|
142
|
-
/**
|
|
143
|
-
* Attempts to mark the given Event as having been handled by this
|
|
144
|
-
* keyboard. If the Event has already been marked as handled,
|
|
145
|
-
* false is returned.
|
|
146
|
-
*
|
|
147
|
-
* @param event The Event to mark.
|
|
148
|
-
* @returns true if the given Event was successfully marked, false if the given
|
|
149
|
-
* Event was already marked.
|
|
150
|
-
*/
|
|
151
|
-
private _markEvent;
|
|
152
|
-
/**
|
|
153
|
-
* Reads through the event log, removing events from the head of the log
|
|
154
|
-
* when the corresponding true key presses are known (or as known as they
|
|
155
|
-
* can be).
|
|
156
|
-
*
|
|
157
|
-
*/
|
|
158
|
-
private _interpretEvents;
|
|
159
|
-
/**
|
|
160
|
-
* Reads through the event log, interpreting the first event, if possible,
|
|
161
|
-
* and returning that event. If no events can be interpreted, due to a
|
|
162
|
-
* total lack of events or the need for more events, null is returned. Any
|
|
163
|
-
* interpreted events are automatically removed from the log.
|
|
164
|
-
*
|
|
165
|
-
* The first key event in the log, if it can be interpreted, or null
|
|
166
|
-
* otherwise.
|
|
167
|
-
*/
|
|
168
|
-
private _interpretEvent;
|
|
169
|
-
/**
|
|
170
|
-
* Releases Ctrl+Alt, if both are currently pressed and the given keysym
|
|
171
|
-
* looks like a key that may require AltGr.
|
|
172
|
-
*
|
|
173
|
-
* @param keysym The key that was just pressed.
|
|
174
|
-
*/
|
|
175
|
-
private _releaseSimulatedAltgr;
|
|
176
|
-
/**
|
|
177
|
-
* Returns whether all currently pressed keys were implicitly pressed. A
|
|
178
|
-
* key is implicitly pressed if its status was inferred indirectly from
|
|
179
|
-
* inspection of other key events.
|
|
180
|
-
*
|
|
181
|
-
* @returns {boolean}
|
|
182
|
-
* true if all currently pressed keys were implicitly pressed, false
|
|
183
|
-
* otherwise.
|
|
184
|
-
*/
|
|
185
|
-
private _isStateImplicit;
|
|
186
|
-
/**
|
|
187
|
-
* Check if a key is implicitly pressed
|
|
188
|
-
* @param keysym the keysym to check
|
|
189
|
-
*/
|
|
190
|
-
private _isImplicitlyPressed;
|
|
191
|
-
/**
|
|
192
|
-
* Given a keyboard event, updates the local modifier state and remote
|
|
193
|
-
* key state based on the modifier flags within the event. This function
|
|
194
|
-
* pays no attention to keycodes.
|
|
195
|
-
*
|
|
196
|
-
* @param event The keyboard event containing the flags to update.
|
|
197
|
-
*
|
|
198
|
-
* @param keyEvent Current best interpretation of the key event being processed.
|
|
199
|
-
*/
|
|
200
|
-
private _syncModifierStates;
|
|
201
|
-
/**
|
|
202
|
-
* Given the remote and local state of a particular key, resynchronises the
|
|
203
|
-
* remote state of that key with the local state through pressing or
|
|
204
|
-
* releasing keysyms.
|
|
205
|
-
*
|
|
206
|
-
* @param remoteState Whether the key is currently pressed remotely.
|
|
207
|
-
* @param localState Whether the key is currently pressed locally. If the state
|
|
208
|
-
* of the key is not known, this may be undefined.
|
|
209
|
-
* @param keysyms The keysyms which represent the key being updated.
|
|
210
|
-
* @param keyEvent Best interpretation of the key event being processed.
|
|
211
|
-
*/
|
|
212
|
-
private _updateModifierState;
|
|
213
|
-
/**
|
|
214
|
-
* Handle keydown event
|
|
215
|
-
* @param keysym the key symbol
|
|
216
|
-
*/
|
|
217
|
-
private _handleKeyDown;
|
|
218
|
-
/**
|
|
219
|
-
* Clears the timers used for key repeat functionality.
|
|
220
|
-
*/
|
|
221
|
-
private _clearKeyRepeatTimers;
|
|
222
|
-
/**
|
|
223
|
-
* Checks if a key is currently pressed.
|
|
224
|
-
*
|
|
225
|
-
* @param keysym The keysym of the key to check.
|
|
226
|
-
* @returns true if the key is pressed, false otherwise.
|
|
227
|
-
*/
|
|
228
|
-
private _isKeyPressed;
|
|
229
|
-
/**
|
|
230
|
-
* Resets the state of this keyboard
|
|
25
|
+
* Resets the keyboard state.
|
|
26
|
+
* This clears any pressed keys and resets the keyboard to its initial state.
|
|
231
27
|
*/
|
|
232
28
|
reset(): void;
|
|
233
|
-
/**
|
|
234
|
-
* Presses and releases the keys necessary to tpe the given string of characters
|
|
235
|
-
* @param message the string to type
|
|
236
|
-
*/
|
|
237
|
-
type(message: string): void;
|
|
238
|
-
/**
|
|
239
|
-
* Marks a key as pressed, firing the keydown event if registered. Key repeat for the pressed
|
|
240
|
-
* key will start after a delay if that key is not a modifier.
|
|
241
|
-
* The return value of this function depends on the return value of the keydown event handler, if any.
|
|
242
|
-
* @param keysym the keysym of the key to press
|
|
243
|
-
* @return {boolean} true if event should not be canceled, false otherwise.
|
|
244
|
-
*/
|
|
245
|
-
press(keysym: number): boolean;
|
|
246
|
-
/**
|
|
247
|
-
* Marks a key as released, firing the keyup event if registered
|
|
248
|
-
* @param keysym the keysym of the key to release.
|
|
249
|
-
*/
|
|
250
|
-
release(keysym: number): void;
|
|
251
29
|
/**
|
|
252
30
|
* Fired whenever the user presses a key with the element associated
|
|
253
31
|
* with this keyboard in focus.
|
|
254
32
|
*
|
|
255
33
|
* @param key The key being pressed
|
|
256
34
|
*/
|
|
257
|
-
|
|
35
|
+
private onKeyDownHandler;
|
|
258
36
|
/**
|
|
259
37
|
* Fired whenever the user releases a key with the element associated
|
|
260
38
|
* with this keyboard in focus.
|
|
261
39
|
*
|
|
262
40
|
* @param key The key being released
|
|
263
41
|
*/
|
|
264
|
-
|
|
42
|
+
private onKeyUpHandler;
|
|
265
43
|
}
|