en:code:device:keyboard
Table of Contents
Keyboard
This object allows you to simulate keyboard actions.
Functions
Keyboard
Constructor function.
Syntax
var myObject = new Keyboard();
Methods
pressKey
Presses a key.
Syntax
myObject.pressKey(key);
Arguments
- key - (string) the key to press
Returns
- (Keyboard) this Keyboard
Exceptions
- (PressKeyError) unable to press the key
Notes
The key parameter can be a single letter or a key name.
releaseKey
Releases a key.
Syntax
myObject.releaseKey(key);
Arguments
- key - (string) the key to release
Returns
- (Keyboard) this Keyboard
Exceptions
- (ReleaseKeyError) unable to release the key
Notes
The key parameter can be a single letter or a key name.
triggerKey
Triggers a key. (press and release)
Syntax
myObject.triggerKey(key);
Arguments
- key - (string) the key to trigger
Returns
- (Keyboard) this Keyboard
Exceptions
- (TriggerKeyError) unable to trigger the key
Notes
The key parameter can be a single letter or a key name.
writeText
Write text.
Syntax
myObject.writeText(text);
myObject.writeText(text, delay);
Arguments
- text - (string) the text to write
- delay - (int) the pause duration (milliseconds) between each character [Added in Actionaz 3.5.0.]
Returns
- (Keyboard) this Keyboard
Exceptions
- (WriteTextError) unable to write the text
en/code/device/keyboard.txt · Last modified: 2021/02/13 11:23 by 127.0.0.1