Key bindings
Keys register through the mayflyKeymap service as named actions; a binding that collides within its scope is rejected. The /help overlay lists every registered binding live, followed by the shared panel keys below — it is the authoritative source for this page (if anything differs, trust /help).
Mayfly's defaults are prefix-less and use zero Alt+ and zero F1–F12 keys, so they stay conflict-free across Termius, Ghostty, WezTerm, Windows Terminal, VS Code, Warp, tmux, and Zellij.
Global actions
In effect unless a capturing panel (a picker, form, or approval in the editor slot) owns input:
| Key | Action | Description |
|---|---|---|
Ctrl-O | Toggle tool output expansion | Switch the most recent 3 turns of tool cards and thinking blocks between one-line summary and full output |
Ctrl-G | External editor | Open the prompt draft (or focused conversation row) in $VISUAL / $EDITOR |
Ctrl-C | Clear / interrupt / exit | Clear draft → interrupt running turn → press twice within 1s on an empty idle prompt to exit |
Shared panel keys
Every panel, picker, and form follows one key grammar. The hint row at the bottom of a focused panel is generated from that same grammar, so it only shows keys that do something in the current state (up to three hints below 80 columns, four from 80, always including Esc when Esc does something):
| Key | Action |
|---|---|
↑/↓ or j/k | Move between rows and fields; scroll documents (j/k outside text and type-filter) |
←/→ | Cycle a select value, adjust a row setting, open or close a tree branch, move along a tab strip, or change step from a wizard's option row |
[ / ] | Switch tabs from anywhere outside text editing or filtering; wizards validate the step being left |
Tab/Shift+Tab | Move between control groups, or commit an active text field or picker and advance |
← | Used by the focused control when it changes something; otherwise it moves focus to the surface's rail of labels, where it does nothing |
Enter or → on a rail | Enter the page beside the rail; ↑/↓ on the rail change the page at once |
↓ (empty prompt) | Enter the views of the status bar (or the first interactive pane); ←/→ or [/] switch views and Esc returns to the prompt |
Ctrl+X | Toggle conversation browse mode from the prompt; Esc or q returns to the prompt |
PgUp/PgDn, Home/End | Page or jump in lists and documents; End on an empty prompt jumps to new messages then bottom |
Enter | Choose, run, open a picker, apply it, or start editing a field |
Type or Backspace | Start editing a focused field, even where Enter submits; in a text row, ←/→ and Home/End move the caret |
Space | Toggle a checkbox or multi-select row, open a multiselect, or fold a tree branch |
Esc | Leave the innermost layer: picker, editing, search, back, return to the first control, then close |
Ctrl+C | Close the surface, asking first when there are unsaved changes |
Type or / | Filter a filterable list; Ctrl+U clears the filter |
1-9 | Pick a numbered row |
z | Expand focused scrollable content to full screen (z or Esc collapses) |
Delete or Backspace | Return a changed non-text field or pinned row to its inherited or default value |
Shift+Enter or \+Enter | Insert a newline in a multi-line field or the prompt |
Enter, Tab, ↑/↓, Backspace | In the prompt: send (or steer while running), queue while running / accept completion, walk history, or remove tokens and exit bash mode |
s, c, x, r, Ctrl+G, f | Save, copy, delete, refresh, open in $EDITOR, or search, wherever a panel offers that meaning |
Details that follow from the grammar:
- Esc leaves one layer per press, the same way everywhere: an open picker is cancelled, then text editing ends (the draft stays), then an active search ends (the filter stays), then a page with a Back target goes back, then focus returns to the panel's first control from anywhere else (the hint reads
Esc back), and only then does the panel close. Tab strips are not a stop on the way out. - Disabled rows and options never take the cursor; movement steps over them. A row or action that is unavailable says why next to its label.
- Select fields change with
←/→and never with↑/↓, which always move to the next field; a focused select shows its value as‹ value ›while it can cycle.Enteropens the option list;Tabapplies the highlighted option and moves on. - Inherited settings carry
(inherited)or(override)after the value. Changing the value overrides it;DeleteorBackspaceon a non-text overriding field returns it to the inherited value. - Filtering starts on the first typed character in pure pickers (
/model,/theme,/permissions,/rewind) or on/in multi-action management panels (/providers,/agents,/jobs,/plugin), keeping bare single letters free for actions until/starts filtering.Ctrl+Uclears the filter; in multi-select listsSpacestill toggles. - Numbered rows keep their numbers while the list scrolls. In gates such as plan review a digit only moves the cursor;
Enterconfirms. - Confirmations are one shared Yes/No decision with No focused first; the question may carry a sentence about consequences.
Editor context
Text-editing keys (cursor movement, multi-line, undo, kill-ring) belong to the underlying editor; in addition:
| Key | Action | Description |
|---|---|---|
Enter | Send / steer | When idle, sends the prompt or runs a /command; while the Agent is running a turn, injects a non-empty prompt as an immediate steer |
Tab | Queue / accept completion | Accepts the active completion popup; while running with a non-empty prompt and no popup open, queues the draft for the next turn |
Shift+Enter or \+Enter | Insert newline | Inserts a newline in the prompt (\ followed by Enter works in every terminal including SSH/Termius) |
Escape | Interrupt / clear / return | While running, interrupts the active turn; idle with a draft, clears it into history (one ↑ away); on an empty idle read-only side conversation, returns to the primary conversation; with an open completion popup, closes it |
Ctrl-C | Clear draft → interrupt → exit | With a draft it only empties the box (one ↑ away) and the run continues; with an empty buffer while running it interrupts; when idle and empty, a second press within 1 second exits Mayfly |
Ctrl-V / /paste | Paste image | Store the clipboard image in the attachment library, inserting an [image #N] marker at the cursor (/paste is the universal fallback where terminals intercept Ctrl-V) |
Ctrl-G | External editor | Hand the draft to an external editor (mayfly.editorCommand → $VISUAL → $EDITOR); quitting with :cq leaves the draft untouched |
Backspace | Delete / exit bash mode | Removes selected inline tokens; on an empty ! bash prompt, exits back to prompt mode |
? | Key help | On an empty prompt, opens key help; anywhere else ? is typed as text |
Ctrl-X | Conversation browse mode | Enters the conversation stream at the newest row (Ctrl-X, Esc, or q returns to the prompt). Inside the stream: ↑/↓/j/k move, [/] jump turns, g/G jump top/bottom, Enter expands, c copies text, Shift+C copies raw JSON, / or ? searches (n/N), Ctrl-G opens in $EDITOR; on a queued row, e edits, s steers now, x cancels, u undoes |
↓ (empty prompt) | Enter status views | On an empty prompt (not recalling history), enters the status bar views (or the first interactive pane); ←/→ or [/] switch views, Esc returns to the prompt |
End (empty prompt) | New messages / tail | Jumps to the new-messages marker first, then to the newest conversation content and follows it |
Shift+Tab | Toggle plan mode | Switches normal ↔ plan while preserving permissions and YOLO (see Session modes) |
These keys reach the editor even while a notice is shown under the prompt. Editor extensions may add actions only on non-printable modifier keys; the editor keeps Esc, Tab, Shift+Tab, and every unmodified key.
Panel contexts
| Surface | Keys |
|---|---|
/help overlay | ↑/↓ / j/k / PgUp / PgDn / Home / End scroll; z expands full-screen; Tab reaches Close; Esc closes |
/sessions picker | Type to filter workspaces or conversations; ↑/↓ moves; Enter opens a workspace, then session details; ← / → folds session branches; Esc ends editing/filtering, then returns one level |
| Approval panel | Focused default is Reject; ←/→ or Tab reach Allow once, Allow for this session, and Reject with feedback; Enter runs; Esc rejects. On the feedback page, Enter sends, Shift+Enter or \+Enter adds a line, Esc ends editing and returns to decisions |
| Questionnaire | 1–9 or ↑/↓ + Enter choose and advance; multi-choice toggles with Space and confirms with Enter; typing in Other starts an answer, Enter submits it; question tabs switch with ←/→ on the strip or [/] outside text editing |
| Form panel | ↑/↓ move between fields; typing or Enter starts editing text, Enter confirms and advances, Shift+Enter or \+Enter inserts a textarea newline; selects cycle with ←/→ or open with Enter; multiselects open with Enter or Space; Delete (or Backspace on non-text controls) resets an overriding field to its inherited value; Tab takes a matching completion or moves to the next group; s saves outside text fields; Esc ends editing, then closes |
| Plan review | ↑/↓ or 1–3 move between decisions and Enter confirms; c copies the plan, o opens feedback; PgUp / PgDn / Shift+K / Shift+J scroll the plan |
/model panel | Type to filter grouped models; ↑/↓ selects, ←/→ adjusts thinking effort; Enter switches; Tab reaches the Refresh button |
/effort panel | ←/→ adjust the slider, Delete/Backspace resets to provider default, Enter confirms |
/permission picker | 1–9 or ↑/↓ + Enter switch presets; full access asks a Yes/No confirmation with No focused |
/agents browser | / starts filtering; ↑/↓/j/k select, Space or ←/→ expands/collapses, */- expand/collapse all, Enter opens, x stops the selected live subagent |
/providers & editor | / starts filtering; a adds a provider or model, r discovers/refreshes models, s saves, k clears stored API key, x deletes the provider, [/] switch tabs |
/plugin marketplace | Installed / Updates / Browse tabs (←/→ on the strip or [/] anywhere outside search); / filters; r refreshes; Tab reaches actions |
| Side conversation | Uses the complete main editor and panel keys; PgUp/PgDn scroll; /back switches to the previous conversation and /close closes the side conversation (on a read-only side view, Esc on an empty idle prompt also returns to the primary conversation) |
Named actions and custom bindings
Every key belongs to a named action, and the key is only that action's current binding. The panel keys above are the ui.* actions (ui.up, ui.accept, ui.cancel, ui.tab-next, ui.expand, …); the common meanings are ui.save, ui.copy, ui.delete, ui.refresh, ui.external, and ui.search; Mayfly's own keys keep their mayfly.* ids (mayfly.focus.stream, mayfly.stream.*, mayfly.interaction.*), and a plugin names its row keys <owner>.<action>. A binding is live in one scope: global, editor, surface, or stream.
Overrides live in the keybindings field of the mayfly settings namespace, keyed by action id, each with the keys that replace the defaults and the label to list it under:
mayfly:
keybindings:
ui.delete: { keys: [d], label: delete }
acme-providers.test: { keys: [ctrl+t], label: Test connection }A change applies at once, and every hint follows it. A key an action gives up stops working: it is not kept as an alias. A binding that collides with another action in the same scope is skipped with a warning naming that action's owner; Esc and Enter cannot be unbound or given to another action; and a printable character cannot be bound in the editor or global scope, where it would type text.
Panel accelerators declared by plugins must be valid key ids, cannot take shared navigation keys, cannot repeat on one page unless their scopes name different controls, and cannot be printable characters on a panel with a type-to-filter list (use filterMode: 'slash' on management lists to keep single letters free).