UsbHideEmulator
Use this interface to configure a usbhidemulator interface. The usbhidemulator class also generates "ledupdate" events which can be listened for with AddEventListener().
enable()
To enable Code Block |
---|
|
Promise<void> enable() |
Enables the HID device:.
disable()
Code Block |
---|
|
Promise<void> enable()disable() |
To disable Disables the HID device. This method is not currently supported:.
clear()
Code Block |
---|
|
Promise<void> disable()clear() |
To clear Clears all active keystrokes and modifiers:.
keyDown()
Code Block |
---|
|
Promise<void> clear()keyDown(int keycode) |
To send Sends a keydown event for the specified USB key code:.
keyPress()
Code Block |
---|
|
Promise<void> keyDownkeyPress(int keycode) |
keyPress()
This is the same as keyDown() followed by keyUp():.
keyUp()
Code Block |
---|
|
Promise<void> keyPresskeyUp(int keycode) |
keyUp()
To send Sends a keyup event for the specified USB key code:.
getLedState()
Code Block |
---|
|
Promise<void> keyUp(int keycode) |
Promise<LedState> getLedState() |
To return Returns an associative array with the current state of all LED states on the keyboard:.
getModifierState()
Code Block |
---|
|
Promise<LedState>Promise<ModifierState> getLedState()getModifierState() |
To return Returns an associative array with the current state of all modifiers (such as, shift, alt, ctrl):.
setModifierState()
Code Block |
---|
|
Promise<ModifierState> getModifierState()setModifierState(ModifierState) |
To set Sets the current modifier state as specified by an associative array. Only modifiers that are listed will cause the state to change
: Code Block |
---|
|
Promise<ModifierState> setModifierState(ModifierState).