Keybindings

The keys of the input box, the pickers, and vim mode, and how to change them.

On macOS, some bindings use Option or Fn keys instead (run /? for exact keybindings).

General

Key Action
Ctrl+C Quit / clear input / copy selection
Ctrl+H Show keybindings
Ctrl+F Search messages
Ctrl+S File picker
Ctrl+O Open plan in editor
Ctrl+T Toggle plan panel
Ctrl+L Model picker
Alt+A Account picker
\ / Ctrl+\ / Ctrl+4 (legacy) Toggle LazyGit for this session’s directory

Editing

Key Action
Alt+\ Type a literal backslash
Enter Submit prompt
Shift+Enter / Ctrl+Enter / Ctrl+J / Alt+Enter Newline
Shift+Tab Toggle plan / build mode
Tab Complete the path at the caret
/command Open command palette
Ctrl+W / ⌥⌫ Delete word backward
Alt+← / Alt+→ Move word left / right
Shift+motion Select text
Ctrl+U / ⌘⌫ Delete to start of line
Ctrl+A Jump to start of line
Home / End Jump to start/end of line
Ctrl+D Scroll half page down
PageUp / PageDown Scroll page up / down
Ctrl+E Jump to end of line
Ctrl+Alt+G Scroll to bottom
Ctrl+Q Pop queue
Esc Esc Rewind
Ctrl+G Edit input in external editor
Ctrl+V Paste clipboard image or text
Alt+Z Undo typing / paste
↓ Focus the attached images (on the last line)

macOS-specific

Key Action
Ctrl+Del / ⌥Del Delete word forward
Ctrl+K Delete to end of line
⌘↑ / ⌘↓ Jump to start/end of input

Images

Key Action
← / → Move between images
Backspace / Del Remove the focused image
Esc / ↑ Back to the text
Any other key Back to the text, which takes the key

Path Completion

Key Action
↑ / ↓ Previous / next match
Tab / Enter Insert the highlighted match
Esc Close
Type Filter the matches

While Streaming

Key Action
↑ / ↓ Navigate input history
Esc Esc Cancel agent
Ctrl+B Move running calls to the background (tmux: press twice)

Vim Normal Mode

Vim mode is off by default. /vim turns it on or off and Hob keeps that choice for the next start. To turn it on in the config, set ui.vim_mode = true. A new prompt starts in insert mode, where every Editing key above works as usual. The input border shows NORMAL or INSERT. The guidance you type after denying a permission request takes the same keys. The guidance has its own register, so p there does not put a yank from the prompt.

u takes back typing one word at a time, with the blanks typed after it. Moving the cursor, a paste, and a key that deletes a word or a line also start a new undo step.

With ui.vim_clipboard = true, a yank also goes to the system clipboard. A plugin binding set for mode "n" wins over vim in normal mode, and one set for "i" wins in insert mode. A terminal without the kitty keyboard protocol can send Esc and the key typed right after it as one Alt press. Hob reads that press as the two keys while vim needs the Esc, unless a plugin binds it.

Key Action
Esc Leave insert mode / cancel a half-typed command
h j k l Move left / down / up / right
w b e Next word / previous word / end of word
W B E The same over words split at blanks only
0 ^ $ Line start / first non-blank / line end
gg G First line / last line
f F t T + char Find a character on the line, forward / backward, or stop before it
; , Repeat the last find / the other way
count + command Repeat a motion or a command, as in 3w, 2dd or d3w
Ctrl+U Scroll half page up
k / j Navigate input history from the first / last line
i a I A Insert before / after the cursor, at the line start / end
o O Open a line below / above
x X Delete the character under / before the cursor
r + char Replace the character under the cursor
~ Switch the case of the character under the cursor
J Join the line below to this one
d c y + motion Delete / change / yank over a motion
d c y + i a + object The same over a text object, inside / around: w W “ ’ ` ( [ { b B
dd cc yy Delete / change / yank the line
D C Delete / change to the line end
s S Y Change the character / change the line / yank the line
p P Paste after / before the cursor
. Repeat the last change
u / Ctrl+R Undo / redo
Enter Submit prompt
Esc Esc Rewind, or cancel the agent while it runs

Paste collapse

Pastes longer than N lines collapse to an italic [paste: first six words…] preview, capped at 60 characters. The full text is still sent to the model.

Click the preview or move the cursor into the paste to expand it. Leaving vim insert mode keeps it collapsed. Navigation follows the original text lines, so Up or Home can enter a hidden line and expand it.

Mouse selection copies the visible preview. Expand it first to select the full text. Drafts, history recall, and $EDITOR round trips retain the text but restore it expanded.

Collapse is enabled by default with a threshold of 10 lines. /paste_collapse shows the current status. on and off keep the threshold, while a positive integer sets it and enables collapsing:

/paste_collapse on
/paste_collapse off
/paste_collapse 20

Changes apply to future pastes in every tab and persist across restarts. Saved settings override ui.paste_collapse and ui.paste_collapse_lines.

Form

Key Action
↑ / ↓ Navigate options
Enter Select option
Esc Close

Pickers

Key Action
↑ / ↓ Navigate
Enter Select
Esc Close
Type Filter
PageUp / PageDown Scroll page up / down
Ctrl+U / Ctrl+D Scroll half page up / down

Context-Specific

Some pickers add extra bindings on top of the defaults:

Context Key Action
Rewind Picker Enter Rewind to the selected prompt, or undo the last rewind
Rewind Picker Ctrl+F Fork up to the selected prompt and switch to it
Queue Enter Remove item
Commands Tab Complete command name or argument
Commands Enter Accept a suggestion, fill in missing arguments, or run the command
Model Picker !/@/#/$ Set tier (strong/medium/weak/compaction)
Model Picker % Fold or unfold provider
Session Picker Ctrl+N New session
Session Picker Ctrl+R Rename session
Session Picker Ctrl+D Delete session (press twice)
Thinking Picker ↑/↓ Move between effort levels
Thinking Picker 0-9 Type a token budget
Thinking Picker Enter Apply and close
Thinking Picker Esc Close without changing anything

Plugins

Built-in plugins register these themselves, and your own plugins can add more with hob.keymap.set:

Key Action
Ctrl+P Browse sessions
Ctrl+X Open tasks
Alt+T Thinking effort

Context Inheritance

Child contexts inherit their parent’s bindings and add their own.

  • Pickers is the base for: Rewind Picker, Theme Picker, Model Picker, Queue, Commands, Search, File Picker

Overriding Keybindings

Rebind a single key from your init.lua with hob.keymap.set. To move a built-in to another key, call its action. This opens the file picker on Alt+S, for terminals that take Ctrl+S:

lua
hob.keymap.set({ "n", "i" }, "<M-s>", function()
  hob.ui.action("file_picker")
end)

{ "n", "i" } lists both modes. Your binding replaces the default on that key, and the default comes back when the binding is removed. When two bindings share a key, the last set wins, and the log names both.

Some keys stay out of reach (the full order is in Key resolution):

  • Ctrl+C and Ctrl+Z, so quit and suspend always work.
  • Esc while the agent runs, so Esc Esc can cancel the turn.
  • The keys of an open modal, picker or prompt, which it handles first.
  • Keys a plugin binds while it loads, like Ctrl+P. Plugins load after your global and project init.lua, so their set comes last.
  • Multi-key combinations and rows like Type to filter. Only single keys can be bound.

/? and the splash show the default labels, even for a key you rebound. Below them, /? lists every key that plugins and your init.lua bound, with its modes and owner, and every action you can call.

Upgrading old keymaps

Older versions fired "n" bindings while you typed in the chat input. Now they fire only in normal mode, so a shortcut set in "n" alone stops working while you type. List both modes:

lua
-- Before:
hob.keymap.set("n", "<M-n>", open_notes)
-- After:
hob.keymap.set({ "n", "i" }, "<M-n>", open_notes)

At startup, the status bar warns about a plugin or init.lua that binds a key in "n" alone. One that also binds a key in "i", like a vim mode, handles modes itself and gets no warning.

Composing keys

Tab switches between plan and build. To make it accept a file completion first while the completion menu is open, bind it in your init.lua and try each action in turn. ev.fallback() hands the key back to Hob when none of them took it:

lua
hob.keymap.set("i", "<Tab>", function(ev)
  if hob.ui.action("completion.accept") then return end
  if hob.ui.action("ghost.accept") then return end
  ev.fallback()
end)

ghost.accept stands for another plugin’s action. An action returns true when it handled the key. If its plugin is not installed or is disabled, it returns nil and the binding moves on.

completion.accept writes file paths into the input, so calling it needs fs_read, input and session_read in ~/.config/hob/plugin.toml (see plugin permissions):

toml
[permissions]
fs_read = true
input = true
session_read = true

Without them the action returns nil, Tab switches between plan and build, and the status bar names the missing permission.

Recovering from a bad keymap

If an override leaves Hob stuck (a modal that does not close, a plugin that throws on load), boot without user init.lua:

Terminal
hob --no-plugins

Skips user init.lua files (global and project) but keeps the Lua host and builtin plugins running, so tools still work. Custom commands and skills still load, and the project permission rules and env file follow folder trust.

The default keymap lives in Rust, not Lua, so --no-plugins never drops it.

Shell and images

These are input conventions, not remappable key rows:

  • Prefix a line with ! to run a shell command yourself (5 minute timeout). Use !! to hide the command and its output from the agent.
  • Pasting image file paths attaches the images.
  • Right-click pastes clipboard text on Windows.
  • Middle-click inserts the PRIMARY selection, the same text middle-click pastes in a shell. Linux only, since other platforms have no PRIMARY selection. On Wayland the compositor must support it.

Keyboard shortcuts

Go to

On this page

  • jkNext or previous section
  • 12…The section with that number
  • cCopy the install command
  • iDownload
  • dDocs
  • []Previous or next page

Anywhere

  • ?Show or hide this list
  • EscClose, or stop a "g"