Skip to content

ZeroTrace HID

Keyboard

Type text, press keys, send combos, media and system keys — the full keyboard command set

Keyboard commands are the core of most payloads. Every command below is dispatched over both USB‑HID and BLE‑HID unless noted.

How arguments work

Arguments are quoted with '…', "…", or `…`. Every argument is expanded first, so ${var}$ and operators like _$random(...) work anywhere. Argument counts are matched exactly — a command given the wrong number of arguments is silently skipped.

Typing text

Types text at full speed. writeLn adds a trailing Enter.

write 'Hello, World!'
writeLn 'Hello, World!'

For multi‑line payloads, use the write blocks (writeLnStart … writeLnEnd) instead of one command per line.

Keys and combos

Press (and release) a single key. Add hold to keep it down, or release to let it up. See the key name reference below.

key 'enter'
key 'f5'
key 'a'

Layout

Keystrokes are sent as scancodes; the host maps them through its active layout. Set the layout to match the target with keyboardLayout (names are case‑sensitive):

keyboardLayout 'German'

The 19 named layouts are: German, SwissGerman, English_UK, French, Spanish, Portuguese, Portuguese_BR, Italian, Danish, Swedish, Turkish, Chinese, Japanese, Korean, Russian, Arabic, Hindi, Polish, Dutch. Any other value (including English) falls back to US English, which is the default. Changing layout briefly re‑initializes the keyboard endpoint, so avoid switching mid‑burst.

Media and system keys

Press a consumer‑control key by name (case‑sensitive). Common names: playpause, nexttrack, prevtrack, stop, mute, volup, voldown, calculator, explorer, brightness_up, brightness_down, browser_home, browser_back, browser_search. See the full media key list.

mediaKey 'playpause'
mediaKey 'volup'

Timing and effects

Sets a global delay inserted after each executed line. Clamped to 060000 ms. Only the first defaultdelay in a script takes effect.

defaultdelay 100

Reference tables

Key names

Names are case‑insensitive (except the F in function keys).

GroupNames
Modifiersctrl/leftctrl, shift/leftshift, alt/leftalt, gui/leftgui/win, rightctrl, rightshift, rightalt/altgr, rightgui
Arrowsup, down, left, right
Navigationhome, end, pageup, pagedown, insert, delete
Lockscapslock, numlock, scrolllock
Whitespace / specialenter, esc, backspace, space, tab, menu, prtsc/printscreen, pause
Numpadnumslash, numasterisk, numminus, numplus, numenter, num0num9, numdot
FunctionF1F24 (capital F)
Charactersany single character, e.g. a, A, 1, /, $

Media keys

bass_down, bass_up, brightness_down, brightness_up, browser_back, browser_bookmarks, browser_forward, browser_home, browser_refresh, browser_search, browser_stop, calculator, config, consumer_control_configuration, email_reader, explorer, local_machine_browser, mute, nexttrack, pan, playpause, power, prevtrack, radio_buttons, radio_controls, radio_led, radio_slider, reset, sleep, stop, treble_down, treble_up, voldown, volup, www_back, www_bookmarks, www_home, www_search, www_stop.

Tricks
  • comboKey joins with +; the gamepad's comboPress joins with ,.
  • terminal 'windows' powershell opens Run, waits 800 ms, then types powershell — don't shorten that settle.
  • Function keys split at F13 internally; F1F24 all map correctly.
  • Use waitFor caps_change to synchronize a payload with a host that toggles Caps Lock as a "ready" signal.

Command Palette

Search for a command to run...