ZeroTrace HID
Gamepad Commands
Emulate a USB gamepad — buttons, sticks, triggers, D‑pad, and automated input patterns
Gamepad commands emulate a standard controller over USB‑HID only (there is no BLE gamepad). Stick and trigger values are 8‑bit signed: -128–127.
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. Button names are case‑insensitive; an unknown name is a no‑op.
Buttons and combos
Presses and holds a button. See the button reference below.
pressButton 'A'
pressButton 'TL'
Sticks and triggers
Sets the left stick position. Both axes are 8‑bit signed (-128–127).
leftStick 100 0
leftStick 0 -100
leftStick 0 0
D‑pad (hat)
Sets the D‑pad (hat) position. See the hat reference below.
hat 'UP_LEFT'
hat 'CENTER'
Reset
reset centers both sticks, zeros the triggers, releases every button, and returns the hat to CENTER.
reset
Reference tables
Buttons
Case‑insensitive. The number is the HID button index.
| Name | Index | Aliases |
|---|---|---|
A | 0 | SOUTH |
B | 1 | EAST |
C | 2 | — |
X | 3 | NORTH |
Y | 4 | WEST |
Z | 5 | — |
TL | 6 | — |
TR | 7 | — |
TL2 | 8 | — |
TR2 | 9 | — |
SELECT | 10 | — |
START | 11 | — |
MODE | 12 | — |
THUMBL | 13 | — |
THUMBR | 14 | — |
Hat positions
| Name | Index |
|---|---|
CENTER | 0 |
UP | 1 |
UP_RIGHT | 2 |
RIGHT | 3 |
DOWN_RIGHT | 4 |
DOWN | 5 |
DOWN_LEFT | 6 |
LEFT | 7 |
UP_LEFT | 8 |
comboPressuses commas ('A,B'); the keyboard'scomboKeyuses+. Mixing them up silently does the wrong thing.comboReleaseandresetboth clear all held buttons —comboReleaseignores any argument you give it.- The
SOUTH/EAST/NORTH/WESTaliases map toA/B/X/Yrespectively — handy for layout‑agnostic payloads. - Always give
sweepSticksa non‑zerosteps.