Logo

⌨️ 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!' 50

Description: Types the provided text with a specified delay (in ms) between each character, then presses Enter.

Syntax:

accurateWriteLn '<text>' <delayMs>

Example:

accurateWriteLn 'Hello, World!' '50'

Key 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: F1 to F24
  • 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'

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:

  • windows
  • linux
  • mac
  • ios
  • android

Syntax:

terminal '<operating_system>'

Example:

terminal 'windows'

Description: Presses a media control key.

Supported Keys:

  • volup, voldown, mute
  • playpause, nexttrack, prevtrack, stop
  • calculator, email_reader, explorer, config
  • brightness_up, brightness_down
  • bass_up, bass_down, treble_up, treble_down
  • radio_controls, radio_buttons, radio_led, radio_slider
  • browser_home, browser_back, browser_forward, browser_refresh, browser_bookmarks, browser_stop, browser_search
  • pan

Syntax:

mediaKey '<key_name>'

Example:

mediaKey 'playpause'

Description: Presses a system control key.

Supported Keys:

  • power_off, standby, wake_host

Syntax:

systemKey '<key_name>'

Example:

systemKey 'screenshot'

Utility Commands

Description: Sets a delay between keypresses.

Syntax:

setDelay '<milliseconds>'

Example:

setDelay '50'

Description: Sets a global delay that will be applied after each command execution.

Syntax:

defaultdelay <milliseconds>

Example:

defaultdelay 100

Notes:

  • 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

On this page