Skip to contentSkip to Content
Language guideKeyboard commands

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.

ModifierMeaning
CTRL / CONTROLControl key
SHIFTShift key
ALTAlt key
GUI / WINDOWS / COMMANDThe Windows key on Windows/Linux, Command key on macOS
CTRL SHIFT, ALT SHIFT, COMMAND CTRL, COMMAND OPTION, COMMAND CTRL SHIFTPre-combined modifier chords, used the same way as a single modifier
CTRL ALT DELETEBuilt-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 strings
2SET_SPEED $Human
3
4REM Select all text and copy it to the clipboard
5CTRL a
6DELAY 100
7CTRL c
gui-example.mantis
1REM Set typing speed
2SET_SPEED $Human
3
4REM Open the Windows Run dialog
5GUI r
6DELAY 500
7
8REM Type a command and execute
9STRINGLN calc.exe
alt-example.mantis
1REM Use ALT to cycle through open windows (Alt-Tab)
2ALT TAB
combinations.mantis
1REM Set typing speed
2SET_SPEED $Human
3
4REM Open Task Manager on Windows using a 3-key chord
5CTRL SHIFT ESCAPE
6DELAY 1000
7
8REM Built-in command for the Windows Security screen
9CTRL ALT DELETE

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 speed
2SET_SPEED $Human
3
4REM Type out a sentence
5STRING This is a mistake.
6DELAY 200
7
8REM Jump to the start of the current line
9HOME
10DELAY 100
11
12REM Hold SHIFT and jump to the end to highlight the whole line
13SHIFT END
14DELAY 100
15
16REM Delete the highlighted text
17DELETE

Function keys

F1 through F12 are all available as bare key presses to trigger application-specific shortcuts.

function-keys.mantis
1REM Refresh the current web page
2F5
3DELAY 500
4
5REM Toggle full-screen mode in browsers
6F11
Last updated on