Command reference
Every command HDC currently supports, grouped the way they’re implemented.
Core commands
| Command | Syntax | Does |
|---|---|---|
STRING | STRING <text> | Types text exactly as written. |
STRINGLN | STRINGLN <text> | Types text, then presses Enter. |
FAST_STRING (Pro) | FAST_STRING <text> | Types text via batched HID codes, at very high WPM. |
STRING_BLOCK | STRING_BLOCK … END_STRING | Types multiple lines collapsed into one. |
DELAY | DELAY <ms> | Pauses the script. |
SET_DELAY | SET_DELAY <ms> | Sets fixed per-keystroke pacing. |
SET_SPEED | SET_SPEED <ms|preset> | Sets per-keystroke pacing via ms or a named preset. |
DEFINE | DEFINE <name> STR|INT <value> | Declares a compile-time constant. |
REM | REM <text> | Comment — ignored by the compiler. |
LOOP | LOOP … END_LOOP | Repeats a block (infinite form only, today). |
LED_ON / LED_OFF | LED_ON · LED_OFF | Onboard status LED on/off. |
WAIT_FOR_BUTTON_PRESS | WAIT_FOR_BUTTON_PRESS | Pauses until the Upload button is pressed. |
FUNCTION | FUNCTION name() … END_FUNCTION | Defines a reusable named block. |
| Function call | name() | Runs a previously defined function. |
BUTTON_DEF | BUTTON_DEF … END_BUTTON | Defines the on-press handler block. |
Examples
Related commands are grouped into one runnable example where it makes sense; standalone commands get their own.
STRING / STRINGLN / FAST_STRING / STRING_BLOCK
STRING Hello
STRINGLN Hello
FAST_STRING Hello
STRING_BLOCK
This block spans three source lines
but types as one.
END_STRINGDELAY / SET_DELAY / SET_SPEED
DELAY 500
SET_DELAY 30
SET_SPEED $HumanDEFINE
DEFINE #NAME STR Hivefusion
STRINGLN Hello #NAMELOOP … END_LOOP
LOOP
STRING .
DELAY 300
END_LOOPLED_ON / LED_OFF
LED_ON
DELAY 300
LED_OFFWAIT_FOR_BUTTON_PRESS
STRING Waiting...
WAIT_FOR_BUTTON_PRESS
STRINGLN Button pressed, continuing.FUNCTION … END_FUNCTION / name()
FUNCTION greet()
STRINGLN Hello from a function!
END_FUNCTION
greet()
greet()BUTTON_DEF … END_BUTTON
BUTTON_DEF
STRINGLN You pressed the button!
END_BUTTONKeys & modifiers
See Keyboard commands for the full key and modifier tables and examples.
Pro / roadmap
Reserved for a future release — not available in the base H1 firmware today:
| Name | Note |
|---|---|
SET_SPEED $Random | Pro-tier variable-speed, human-like typing. |
ATTACKMODE | Planned HID / CDC / OFF mode switching from within a script. |
INJECT_MOD | Reserved modifier-injection keyword. |
| Serial / CDC scripting | Planned commands for scripting the device’s serial (USB CDC) channel directly. |
Last updated on