Keyboard Commands
Text Input Commands
Description: Prints the provided text as keyboard input.
Syntax:
write '<text>'Example:
write 'Hello, World!'Description: Prints the provided text followed by pressing Enter.
Syntax:
writeLn '<text>'Example:
writeLn 'Hello, World!'Description: Types the provided text with a specified delay (in ms) between each character.
Syntax:
accurateWrite '<text>' <delayMs>Example:
accurateWrite 'Hello, World!' 50Description: Types the provided text with a specified delay (in ms) between each character, then presses Enter.
Syntax:
accurateWriteLn '<text>' <delayMs>Example:
accurateWriteLn 'Hello, World!' 50Description: Types the provided text using a built-in per-character delay (in ms).
Syntax:
delayedWrite '<text>' <delayMs>Example:
delayedWrite 'Hello, World!' 50Description: Types the provided text using a built-in per-character delay (in ms), then presses Enter.
Syntax:
delayedWriteLn '<text>' <delayMs>Example:
delayedWriteLn 'Hello, World!' 50Key Press Commands
Description: Presses and releases a specific keyboard key. Optionally, you can specify whether to hold or release the key.
Supported Keys:
- Modifiers:
ctrl,leftctrl,shift,leftshift,alt,leftalt,gui,leftgui,win,rightctrl,rightshift,rightalt,altgr,rightgui - Arrow Keys:
up,down,left,right - Function Keys:
F1toF24 - Special Keys:
enter,esc,backspace,space,tab,delete,insert,home,end,pageup,pagedown,capslock,numlock,scrolllock,menu,prtsc,printscreen,pause - Numpad Keys:
numslash,numasterisk,numminus,numplus,numenter,num1-num0,numdot - Single Characters: Any single character (e.g.,
a,b,1,2, etc.)
Syntax:
key '<key_name>' '[<action>]'Example:
key 'esc'
key 'ctrl' 'hold'
key 'ctrl' 'release'Description: Simulates pressing multiple keys simultaneously.
Syntax:
comboKey '<key1+key2+...>'Example:
comboKey 'ctrl+shift+esc'
comboKey 'alt+tab'Description: Presses an arrow key (up, down, left, or right).
Syntax:
arrowKey '<direction>'Example:
arrowKey 'left'
arrowKey 'down'Description: Presses a raw HID key code directly. Supports optional hold and release actions.
Syntax:
keyCode <code> [action]Examples:
keyCode 0x04
keyCode 0xE1 hold
keyCode 0xE1 releaseNotes:
- Accepts decimal or hex (
0x..) - Valid range is
0x00to0xFF
System Control Commands
Description: Changes the keyboard layout to a specified language.
Supported Layouts: German, English, English_UK, French, Spanish, Portuguese, Portuguese_BR
Italian, Danish, Swedish, Turkish, Chinese, Japanese, Korean, Russian, Arabic
Hindi, Polish, Dutch
Syntax:
keyboardLayout '<language>'Example:
keyboardLayout 'German'Description: Opens the terminal application for a specified operating system.
Supported Values:
windowslinuxmac
Syntax:
terminal '<operating_system>' [powershell]Example:
terminal 'windows'
terminal 'windows' powershellDescription: Presses a media control key.
Supported Keys:
volup,voldown,muteplaypause,nexttrack,prevtrack,stopcalculator,email_reader,explorer,configbrightness_up,brightness_downbass_up,bass_down,treble_up,treble_downradio_controls,radio_buttons,radio_led,radio_sliderbrowser_home,browser_back,browser_forward,browser_refresh,browser_bookmarks,browser_stop,browser_search- Alias names also supported:
www_home,www_back,www_bookmarks,www_stop,www_search,local_machine_browser,consumer_control_configuration pan
Syntax:
mediaKey '<key_name>'Example:
mediaKey 'playpause'Description: Sends a raw HID consumer/media usage code directly.
Syntax:
mediaKeyCode <code>Example:
mediaKeyCode 0x00E2Notes:
- Accepts decimal or hex (
0x..) - Valid range is
0x0000to0xFFFF
Description: Presses a system control key.
Supported Keys:
power_off,standby,wake_host
Syntax:
systemKey '<key_name>'Example:
systemKey 'power_off'Description: Sends a raw HID system usage code directly.
Syntax:
systemKeyCode <code>Example:
systemKeyCode 0x0081Utility Commands
Description: Sets a global delay that will be applied after each command execution.
Syntax:
defaultdelay <milliseconds>Example:
defaultdelay 100Notes:
- Affects all subsequent commands in the script
- Setting to 0 disables the default delay
Description: Rapidly presses random keys (for testing or effects).
Syntax:
jamKeys <duration> <interval>Example:
jamKeys 5000 100 // Jams keys for 5 seconds every 100ms