buffr default keymap (page mode)

Reference for the default page-mode bindings shipped by buffr_modal::Keymap::default_bindings. All entries assume the leader key is \ (vim default); the leader is configurable per-profile via Keymap::set_leader.

The engine speaks vim-flavoured chord notation. <C-...> = Ctrl, <S-...> = Shift, <M-...> / <A-...> = Alt, <D-...> = Super (Cmd on macOS), <leader> = configured leader char.

Modes

ModeTriggerNotes
Normalinitial / <Esc>Default; bindings below.
Visual(Phase 3)Selection-bearing motions. <Esc> returns to Normal.
Command: or oCommand line / omnibar focused. <Esc> returns.
Hintf / FDOM hint overlay active. <Esc> returns.
Pending(transient)Multi-key prefix in flight. Not user-bindable.
Edittext-field focusForwarded to hjkl_editor::Editor once Phase 2 ships.

Count and register prefixes

  • Count — leading digits accumulate: 5j scrolls down 5 lines, 12G jumps to line 12 (when implemented). 0 alone is bindable (vim convention: column 0); digits 1-9 always start a count.
  • Register"<char> selects a register before a yank. Phase 2 captures register state on the engine but does not yet thread it through to actions. Yank-to-register lands with Phase 5.

Ambiguity timeout

When a binding is a prefix of a longer one (g vs gg), the engine waits up to Engine::timeout() (default 1000ms). If the user does not extend the prefix, the shorter action fires.

Normal-mode bindings

Scroll

KeysAction
jScrollDown(1)
kScrollUp(1)
hScrollLeft(1)
lScrollRight(1)
<C-d>ScrollHalfPageDown
<C-u>ScrollHalfPageUp
<C-f>ScrollFullPageDown
<C-b>ScrollFullPageUp
ggScrollTop
GScrollBottom

Tabs

KeysAction
gtTabNext
gTTabPrev
<C-w>cTabClose
tTabNew
<C-w>nDuplicateTab
<C-w>pPinTab

TabClose (and :q) close the active tab. The application only exits when the last tab is gone. DuplicateTab clones the active tab's URL into a fresh tab; PinTab toggles the pinned bit (sort hint only — pin does not prevent close). See multi-tab.md.

History

KeysAction
HHistoryBack
LHistoryForward

Reload / stop

KeysAction
rReload
<C-r>ReloadHard
<C-c>StopLoading

Omnibar / command line

KeysAction
oOpenOmnibar
:OpenCommandLine

Hints

KeysAction
fEnterHintMode
FEnterHintModeBackground

Find

KeysAction
/Find { forward: true }
?Find { forward: false }
nFindNext
NFindPrev

Yank

KeysAction
yYankUrl

Zoom

KeysAction
+ZoomIn
-ZoomOut
=ZoomReset

DevTools

KeysAction
<C-S-i>OpenDevTools

Mode transitions

The engine reads the resolved [PageAction] and auto-transitions:

  • OpenOmnibar, OpenCommandLineCommand
  • EnterHintMode, EnterHintModeBackgroundHint
  • EnterEditModeEdit (trie bypassed; feed_edit_mode_key takes over)
  • EnterMode(m)m

<Esc> is bound in Visual / Command / Hint to EnterMode(Normal) so every mode has a guaranteed escape hatch.

In-overlay shortcuts (command line / omnibar)

When : opens the command line or o/O opens the omnibar, all keystrokes route to the input bar instead of the page-mode trie. The bindings below mirror readline / vim's command-line conventions.

KeysAction
<Esc> / <C-c>Cancel — close overlay, return to Normal mode.
<CR>Confirm — dispatch the command or navigate to the URL.
<Tab> / <Down>Move suggestion selection one row down (cycles to last).
<S-Tab> / <Up>Move suggestion selection one row up (clears at top).
<Left> / <Right>Move cursor through the buffer.
<BS>Delete the codepoint before the cursor.
<C-u>Clear the entire buffer.
<C-w>Delete the word before the cursor.

In-prompt shortcuts (permissions)

When a page asks for a permission (camera, microphone, geolocation, notifications, clipboard, MIDI sysex, …) buffr surfaces a prompt strip and routes keystrokes to it until the request is resolved. The page content does not see these keys.

KeysAction
a / yAllow once (no row written).
A / YAllow + remember for this origin.
d / nDeny once (no row written).
D / NDeny + remember for this origin.
sSynonym for D — deny + remember.
<Esc>Defer — Dismiss / cancel(), no persistence.

If multiple requests pile up they queue; the statusline shows (N more pending) on the prompt strip. After resolving one the next prompt appears on the following frame.

See crates/buffr-permissions/README.md for the decision-precedence rules.

Customising

Bindings come from a static table in crates/buffr-modal/src/keymap.rs. User overrides go in ~/.config/buffr/config.toml under [keymap.<mode>] — see config.md for the full schema and action notation. The watcher reloads the keymap on file changes (250ms debounced).