Skip to content

Keyboard and mouse

Press ? at any time for Hunk's in-app shortcut reference. Menus and primary review actions are also mouse-selectable.

KeysAction
↑ / ↓, k / jMove the current line
Space / f, bPage down / up
PageDown / PageUpPage down / up
Shift+SpacePage up
d / u, Ctrl+D / Ctrl+UHalf page down / up
[ / ]Previous / next hunk
, / .Previous / next file
{ / }Previous / next annotated hunk
/Search diff content
n / NNext / previous search match
Home / End, g / GStart / end of review
← / →Scroll unwrapped code; hold Shift for faster movement

Hunk navigation stays review-wide: hunk and file shortcuts move through the same multi-file stream shown in the main pane.

/ opens a less-style prompt on the status row. Enter jumps to the next hunk containing the text (case-insensitive until the query has an uppercase letter), n / N repeat in either direction and wrap, the status row reports [i/n] path:line, and every match is marked inside the diff with the landed line inverted. Reopening / shows the last query: Escape clears it, and submitting the emptied prompt ends the search.

↑ / ↓ and k / j move a highlighted current line, and the view scrolls only far enough to keep it visible. Paging or scrolling past it moves it to the nearest line still on screen, and c anchors a note on it. Pick the marker from the View menu, or set cursor_line: number marks only the line number, and off turns the marker off and lets ↑ / ↓ and k / j scroll the view one row at a time instead.

KeyAction
0 / 1 / 2Auto / unified / split layout
sToggle files pane
tChoose a theme
lToggle line numbers
wToggle line wrapping
mToggle hunk metadata
MToggle menu bar
zToggle unchanged context for the selected hunk
aToggle agent notes
eOpen the selected file in $EDITOR
TabMove focus between the file list and file filter
rReload a reloadable input
F10Open menus
qQuit

Hunk may offer to save view changes on quit. Saving writes personal preferences globally unless the repository already has a .hunk/config.toml.

KeyAction
vStart a visual selection from the current line
yCopy the selection
cAdd a note on the current line
Ctrl+SSave the note you are editing
E / R / DEdit, reply to, or delete the active note
?Show every shortcut

Press c or use a visible add-note affordance with the mouse. While editing, app shortcuts are suspended so normal text entry works. Press Ctrl+S to save or Escape to cancel.

Copying goes through the terminal clipboard protocol (OSC 52). If your terminal or multiplexer blocks it, Hunk reports that the clipboard is unavailable; see terminal compatibility.

  • Click a sidebar file to jump to it in the review stream.
  • Click menus and dialog actions instead of their key equivalents.
  • Use the wheel or scrollbar to move through the review; hold Shift while scrolling to move horizontally through unwrapped code.
  • Drag across diff rows to select them, then copy or comment from the selection's action bar.

Every shortcut above is a named command you can move to different keys with a [keybindings] table in your user config. See Keybindings. The file filter ships without its own key (Tab and the File menu reach it); "hunk.review.focusFilter" = "/" moves it to /, which leaves content search without a key until you bind hunk.search.find elsewhere.

Terminal mouse protocols vary; see terminal compatibility if clicks or selection do not behave as expected.