M31A's shortcuts are defined in packages/cli/src/ui/key/keyBindings.ts and grouped into ten categories. Press ? in the UI for the in-app shortcut list, or run /shortcuts.
Basic controls
| Action | Default keys |
|---|---|
| Confirm selection | Enter |
| Cancel / dismiss | Escape, Ctrl+[ |
| Cancel request or quit when input is empty | Ctrl+C |
| Exit when input is empty | Ctrl+D |
Cursor movement
| Action | Default keys |
|---|---|
| Start of line | Ctrl+A, Home |
| End of line | Ctrl+E, End |
| Move up / down | Up, Down |
| Move left | Left |
| Move right | Right, Ctrl+F |
| Word left | Ctrl+Left, Alt+Left, Alt+B |
| Word right | Ctrl+Right, Alt+Right, Alt+F |
Editing
| Action | Default keys |
|---|---|
| Delete to end of line | Ctrl+K |
| Delete to start of line | Ctrl+U |
| Clear input | Ctrl+C |
| Delete previous word | Ctrl+Backspace, Alt+Backspace, Ctrl+W |
| Delete next word | Ctrl+Delete, Alt+Delete, Alt+D |
| Delete character left | Backspace, Ctrl+H |
| Delete character right | Delete, Ctrl+D |
| Undo | Platform-dependent: Alt+Z, Cmd+Z, Ctrl+Z (Linux), Cmd+Z/Alt+Z (macOS), Ctrl+Z/Alt+Z (Windows) |
| Redo | Ctrl+Shift+Z, Cmd+Shift+Z, Alt+Shift+Z |
Scrolling
| Action | Default keys |
|---|---|
| Scroll up / down | Shift+Up, Shift+Down |
| Scroll to top | Ctrl+Home, Shift+Home |
| Scroll to bottom | Ctrl+End, Shift+End |
| Page up / down | PageUp, PageDown |
History and search
| Action | Default keys |
|---|---|
| Previous history entry | Ctrl+P |
| Next history entry | Ctrl+N |
| Reverse search | Ctrl+R |
| Submit reverse-search match | Enter |
| Accept suggestion in reverse search | Tab |
Navigation
| Action | Default keys |
|---|---|
| Move selection up / down | Up, Down |
| Dialog up / down | Up/K, Down/J |
| Next dialog item | Tab |
| Previous dialog item | Shift+Tab |
Suggestions and completions
| Action | Default keys |
|---|---|
| Accept suggestion | Tab, Enter |
| Previous completion | Up, Ctrl+P |
| Next completion | Down, Ctrl+N |
| Expand / collapse suggestion | Right, Left |
Text input
| Action | Default keys |
|---|---|
| Submit prompt | Enter |
| Queue message | Tab |
| Queue prompt while running | Ctrl+Enter |
| Steer current turn | Ctrl+S |
| Newline | Ctrl+Enter, Cmd+Enter, Alt+Enter, Shift+Enter, Ctrl+J |
| Open external editor | Ctrl+G, Ctrl+Shift+G |
| Paste from clipboard | Ctrl+V, Cmd+V, Alt+V |
App controls
| Action | Default keys |
|---|---|
| Error details / debug console | F12 |
| Full TODO list | Ctrl+T |
| IDE context detail | F4 |
| Toggle Markdown rendering | Alt+M |
| Toggle copy mode | F9 |
| Toggle mouse mode | Ctrl+S |
| Toggle YOLO mode | Ctrl+Y |
| Toggle sidebar | Alt+S, F10 |
| Cycle approval mode | Shift+Tab |
| Show more lines | Ctrl+O |
| Expand paste placeholder | Ctrl+O |
| Focus / unfocus shell input | Tab, Shift+Tab |
| Clear screen | Ctrl+L |
| Restart app | R, Shift+R |
| Suspend app | Ctrl+Z |
| Voice push-to-talk | Space |
Background shell controls
| Action | Default keys |
|---|---|
| Dismiss background shell list | Escape |
| Select in background shell list | Enter |
| Toggle current shell | Ctrl+B |
| Toggle shell list | Ctrl+L |
| Kill active shell | Ctrl+K |
| Unfocus shell / shell list | Shift+Tab, Tab |
Other controls
| Action | Default keys |
|---|---|
| Update extension | I |
| Link extension | L |
| Dump current frame | F8 |
| Start / stop recording | F6, F7 |
| Open command palette | Ctrl+Shift+P, Alt+P |
| Leader key chord | Alt+X |
Customizing keybindings
Create ~/.m31a/keybindings.json (path reported by Storage.getUserKeybindingsPath()). Entries merge over the defaults. Each entry names a command ID, a key or keys array, and can negate a command to remove inherited defaults:
json
[
{"command": "app.cycleApprovalMode", "key": "ctrl+shift+a"},
{"command": "-basic.confirm", "key": "enter"},
{"command": "app.openCommandPalette", "keys": ["ctrl+p", "alt+p"]}
]Invalid commands or bindings are reported at load time. Vim mode can be enabled with general.vimMode in settings or with /vim.
Next steps
See Slash commands for the commands these keys trigger.