Skip to contentSkip to Content
The Language of MantisCommand reference

Command reference

Every command HDC currently supports, grouped the way they’re implemented.

Core commands

CommandSyntaxDoes
STRINGSTRING <text>Types text exactly as written.
STRINGLNSTRINGLN <text>Types text, then presses Enter.
FAST_STRING (Pro)FAST_STRING <text>Types text via batched HID codes, at very high WPM.
STRING_BLOCKSTRING_BLOCK … END_STRINGTypes multiple lines collapsed into one.
DELAYDELAY <ms>Pauses the script.
SET_DELAYSET_DELAY <ms>Sets fixed per-keystroke pacing.
SET_SPEEDSET_SPEED <ms|preset>Sets per-keystroke pacing via ms or a named preset.
DEFINEDEFINE <name> STR|INT <value>Declares a compile-time constant.
REMREM <text>Comment — ignored by the compiler.
LOOPLOOP … END_LOOPRepeats a block (infinite form only, today).
LED_ON / LED_OFFLED_ON · LED_OFFOnboard status LED on/off.
WAIT_FOR_BUTTON_PRESSWAIT_FOR_BUTTON_PRESSPauses until the Upload button is pressed.
FUNCTIONFUNCTION name() … END_FUNCTIONDefines a reusable named block.
Function callname()Runs a previously defined function.
BUTTON_DEFBUTTON_DEF … END_BUTTONDefines 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_STRING

DELAY / SET_DELAY / SET_SPEED

DELAY 500 SET_DELAY 30 SET_SPEED $Human

DEFINE

DEFINE #NAME STR Hivefusion STRINGLN Hello #NAME

LOOP … END_LOOP

LOOP STRING . DELAY 300 END_LOOP

LED_ON / LED_OFF

LED_ON DELAY 300 LED_OFF

WAIT_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_BUTTON

Keys & 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:

NameNote
SET_SPEED $RandomPro-tier variable-speed, human-like typing.
ATTACKMODEPlanned HID / CDC / OFF mode switching from within a script.
INJECT_MODReserved modifier-injection keyword.
Serial / CDC scriptingPlanned commands for scripting the device’s serial (USB CDC) channel directly.
Last updated on