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.
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 0–60000 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).
| Group | Names |
|---|---|
| Modifiers | ctrl/leftctrl, shift/leftshift, alt/leftalt, gui/leftgui/win, rightctrl, rightshift, rightalt/altgr, rightgui |
| Arrows | up, down, left, right |
| Navigation | home, end, pageup, pagedown, insert, delete |
| Locks | capslock, numlock, scrolllock |
| Whitespace / special | enter, esc, backspace, space, tab, menu, prtsc/printscreen, pause |
| Numpad | numslash, numasterisk, numminus, numplus, numenter, num0–num9, numdot |
| Function | F1–F24 (capital F) |
| Characters | any 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.
comboKeyjoins with+; the gamepad'scomboPressjoins with,.terminal 'windows' powershellopens Run, waits 800 ms, then typespowershell— don't shorten that settle.- Function keys split at F13 internally;
F1–F24all map correctly. - Use
waitFor caps_changeto synchronize a payload with a host that toggles Caps Lock as a "ready" signal.