Keyboard commands
A bare key name presses that key by itself. A modifier followed by a key combines them into one chord (e.g., holding CTRL while pressing c).
Modifiers
Modifiers are special keys used in combination with other keys to perform shortcuts.
| Modifier | Meaning |
|---|---|
CTRL / CONTROL | Control key |
SHIFT | Shift key |
ALT | Alt key |
GUI / WINDOWS / COMMAND | The Windows key on Windows/Linux, Command key on macOS |
CTRL SHIFT, ALT SHIFT, COMMAND CTRL, COMMAND OPTION, COMMAND CTRL SHIFT | Pre-combined modifier chords, used the same way as a single modifier |
CTRL ALT DELETE | Built-in three-key Secure Attention Sequence shortcut |
Modifiers in Action
Below are examples of how to use each modifier key to trigger common operating system shortcuts.
ctrl-example.mantis
1REM Set typing speed for injected strings2SET_SPEED $Human34REM Select all text and copy it to the clipboard5CTRL a6DELAY 1007CTRL cgui-example.mantis
1REM Set typing speed2SET_SPEED $Human34REM Open the Windows Run dialog5GUI r6DELAY 50078REM Type a command and execute9STRINGLN calc.exealt-example.mantis
1REM Use ALT to cycle through open windows (Alt-Tab)2ALT TABcombinations.mantis
1REM Set typing speed2SET_SPEED $Human34REM Open Task Manager on Windows using a 3-key chord5CTRL SHIFT ESCAPE6DELAY 100078REM Built-in command for the Windows Security screen9CTRL ALT DELETENavigation & editing keys
These keys allow you to move the cursor, select text, and manage UI menus without a mouse.
| Keys |
|---|
UPARROW, DOWNARROW, LEFTARROW, RIGHTARROW |
PAGEUP, PAGEDOWN, HOME, END |
INSERT, DELETE / DEL, BACKSPACE, TAB, SPACE, ENTER, ESCAPE |
PAUSE_BREAK, PRINTSCREEN, MENU APP |
CAPSLOCK, NUMLOCK, SCROLLOCK |
Editing Example
You can combine navigation keys with modifiers to perform complex text editing very quickly.
editing.mantis
1REM Set typing speed2SET_SPEED $Human34REM Type out a sentence5STRING This is a mistake.6DELAY 20078REM Jump to the start of the current line9HOME10DELAY 1001112REM Hold SHIFT and jump to the end to highlight the whole line13SHIFT END14DELAY 1001516REM Delete the highlighted text17DELETEFunction keys
F1 through F12 are all available as bare key presses to trigger application-specific shortcuts.
function-keys.mantis
1REM Refresh the current web page2F53DELAY 50045REM Toggle full-screen mode in browsers6F11Last updated on