ZeroTrace HID
Keyboard Injection
Type strings, press keys, and send modifier combinations from a script
The core HID primitive. Almost every payload that touches a target host is built from these commands. They dispatch over both USB-HID and BLE-HID.
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.
Type 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.
key 'enter'
key 'f5'
Layout
Keystrokes are sent as scancodes; the host maps them through its active layout. Match the target with keyboardLayout (names are case-sensitive):
keyboardLayout 'German'
A wrong layout produces wrong special characters (@ becomes ", and so on). See Multi-Language Support for the full list of 19 layouts.
The complete key-name and media-key reference lives on the Scripting Language → Keyboard page.