Command glossary.
Write one instruction per line. Keystrokes go to the focused application; the macro does not automatically open or select a text editor.
01 / Available commands
| Syntax | Behavior |
|---|---|
REM comment | Adds a comment. Does not type anything or add a delay. |
STRING text | Types text using the selected keyboard layout. Preserves capitalization and spaces. |
STRINGLN text | Types text and presses Enter. STRINGLN without text only presses Enter. |
ENTER | Presses Enter. |
TAB | Presses Tab. |
SPACE | Presses Space. |
ESC / ESCAPE | Presses Escape. Both names refer to the same key. |
BACKSPACE | Deletes the character before the cursor. |
DELETE | Deletes the character after the cursor. |
UP / DOWN / LEFT / RIGHT | Presses an arrow key. Use one key name per line. |
HOME / END | Presses Home or End. The active application determines where the cursor moves. |
PAGEUP / PAGEDOWN | Presses Page Up or Page Down. |
F1 … F12 | Presses a function key. Its behavior depends on the active application. |
CTRL key / CONTROL key | Presses Control plus a key. Example: CTRL HOME. |
ALT key | Presses Alt plus a key. |
SHIFT key | Presses Shift plus a key. Example: SHIFT LEFT. |
GUI / WINDOWS | Presses the Windows key. Also accepts a key as an argument. |
CTRL SHIFT END | Combines multiple modifiers with one final key. Letters and function keys are also supported. |
DELAY 10000 | Waits 10 seconds. Long delays are split internally instead of being capped at 2,550 ms. |
DEFAULT_DELAY 100 / DEFAULTDELAY 100 | Adds 100 ms after each executable instruction except DELAY. Use either command name. |
TYPE_DELAY 50 | Adds 50 ms between characters in STRING and STRINGLN. Adds no delay after the last character or before the final Enter. |
REPEAT 5 | Runs the last executable instruction five more times: six executions total, including the original. |
02 / Text editor example
Open a blank document and bring it to the foreground during the initial delay. This example types a sentence three times, then selects the last character of the final sentence.
REM Prepare the text editor
DELAY 10000
TYPE_DELAY 50
DEFAULT_DELAY 100
STRINGLN Hello from BadBito
REPEAT 2
UP
END
SHIFT LEFT03 / Rules and limits
Text and key combinations
Command and key names are case-insensitive. STRING text is case-sensitive. Separate the command from its text with one space or tab; any additional spaces become part of the text. Only add quotation marks if you want to type them.
In combinations, CTRL A and CTRL a mean Control + A without Shift. To include Shift, write CTRL SHIFT a. Combinations support modifiers and one final key, not multiple regular keys at once. Available characters depend on the keyboard layout. Windows layouts preserve combined Shift+AltGr modifiers. Standalone dead accents are followed by Space so they do not combine with the next letter; this uses an extra two encoded bytes. Japanese and German (Mac) remain marked as verification pending. The standard Italian layout rejects backtick and tilde because no direct mapping was verified.
Missing characters or typing too fast?
Add TYPE_DELAY 30 before your first STRING or STRINGLN, then generate and program the firmware again. This adds 30 ms between text characters, on top of the firmware key timing. If characters are still missing, try TYPE_DELAY 50.
TYPE_DELAY 30
STRINGLN Your text hereDEFAULT_DELAY (also written DEFAULTDELAY) separates instructions; it does not slow the characters within a STRING instruction. TYPE_DELAY applies to subsequent text instructions until changed, and its encoded delays consume macro space. It does not add a delay before the final Enter of STRINGLN. Test again in a blank document. If the issue persists, confirm the keyboard layout and use the keyboard test in Diagnostics.
Delays and repetition
Durations are integers from 0 to 3,600,000 ms, encoded in 10 ms increments. Intermediate values round up: 15 ms is encoded as 20 ms. TYPE_DELAY 0 and DEFAULT_DELAY 0 turn those settings off.
REPEAT accepts 1 to 1,000 additional repetitions. It also repeats the delays encoded with the original instruction. Comments and configuration changes do not replace that instruction. Consecutive REPEAT commands repeat the original instruction without compounding the repetition count. Blocks and nested loops are not supported.
Memory and errors
The editor uses the current Bitorino v2 firmware. Bitorino v2 (AT90USB162, 16 MHz) allows 60,000 source bytes and 8,184 encoded bytes. Each keystroke uses 2 bytes; each delay segment of up to 2,550 ms uses another 2 bytes. TYPE_DELAY and REPEAT also use space. A valid parameter value may exceed available space when expanded.
An unknown command, invalid combination, or oversized expansion stops generation and displays the line number. Blank lines and comments count toward line numbering. Bitorino v2 adds a three-second startup wait and minimum 10 ms key-hold and release intervals. The macro runs once after USB configuration and does not restart after a USB interruption. Blue blinks while running, stays on after completion, and red indicates validation or endpoint configuration failure. WebUSB verifies application Flash before restarting. Basic typing has been confirmed on the board; full hardware coverage remains pending. See the releases page for changes.