Keybindings

Binding syntax, the prefix key, tmux keys, layout presets, link hints, and custom commands.

Keys are set in the [keys] section of config.toml. Press prefix+? in flockr to see every key in effect. The full default list is in the Key reference.

Binding format

Each action takes one binding or a list:

[keys]
prefix = "ctrl+b"
new_tab = "prefix+c"
split_vertical = ["prefix+v", "prefix+%"]
clear_pane = "prefix+ctrl+k"
next_agent = ""            # empty means unbound
  • prefix+n means press the prefix, then n.
  • A binding without prefix+, such as ctrl+alt+n, is a direct shortcut that works at any time.
  • Keys: plain keys, the modifiers ctrl, shift, alt, cmd, and super, and special keys such as enter, tab, esc, left, right, up, and down.
  • Named punctuation is accepted too, such as minus, comma, ampersand, plus, backtick, colon, and slash.
  • Indexed actions take a range: "alt+1..9". switch_workspace also takes more keys after the range for spaces 10 and up: "ctrl+alt+1..9,0,y,u,i,p".

The most reliable direct bindings are ctrl+letter, function keys, and explicit modified chords. alt+..., cmd/super, and punctuation with modifiers may depend on your terminal and tmux setup.

The prefix key

The default prefix is ctrl+b. Change it with prefix:

[keys]
prefix = "ctrl+a"

Other examples from the default config: "f12", "esc", "-".

Modes

  • Prefix mode: after you press the prefix, flockr waits for an action key.
  • Navigate mode (prefix+w): move through spaces with up/down, focus panes with h/j/k/l, switch spaces with 1..9, press enter to open a space, and esc to leave. m grabs the selected space so the space keys move it; press m or enter to drop it, or esc to put it back. The navigate_* keys set these and win while navigate mode is open. Don't use prefix+, esc, enter, or tab in them.
  • Resize mode (prefix+r).
  • Copy mode (prefix+[): keyboard copy mode for the focused pane.

tmux-compatible keys

If you come from tmux, these work the same way:

KeysAction
ctrl+bPrefix
prefix+%Split side by side (also prefix+v)
prefix+"Split stacked (also prefix+minus)
prefix+cNew tab
prefix+n, prefix+pNext tab, previous tab
prefix+1..9Switch to tab 1 to 9
prefix+xClose pane
prefix+zZoom pane
prefix+[Copy mode
prefix+ctrl+h/j/k/lResize the pane without entering resize mode
prefix+spaceNext layout preset

Layout presets

The layout presets match tmux. The main_* layouts lead with the focused pane.

KeysActionLayout
prefix+alt+1layout_even_horizontalAll panes side by side, equal widths
prefix+alt+2layout_even_verticalAll panes stacked, equal heights
prefix+alt+3layout_main_horizontalFocused pane across the top, the rest side by side below
prefix+alt+4layout_main_verticalFocused pane on the left, the rest stacked on the right
prefix+alt+5layout_tiledAll panes in a grid
prefix+alt+6layout_main_horizontal_mirroredThe rest side by side on top, focused pane across the bottom
prefix+alt+7layout_main_vertical_mirroredThe rest stacked on the left, focused pane on the right
prefix+alt+8layout_tiled_main_bottomThe rest in a grid, focused pane across the bottom
prefix+spacenext_layoutNext preset
(unset)previous_layoutPrevious preset
prefix+shift+espread_layoutKeep the shape, give side-by-side panes equal space

Size the main pane with ui.main_pane_width (default 80, used by main_vertical) and ui.main_pane_height (default 24, used by main_horizontal). Each takes a cell count or a percentage such as "60%".

prefix+f (link_hints) labels the visible links in the focused pane. Type a label to open that link, or shift plus the label to copy it.

Command palette

prefix+: or prefix+/ (command_palette) opens a search over every action and custom command. Pick one and press enter to run it.

Custom commands

Bind a key to a shell command with [[keys.command]]:

[[keys.command]]
key = "prefix+alt+g"
type = "popup"
command = "lazygit"
description = "lazygit"
width = "80%"
height = "80%"
FieldMeaning
keyThe binding, same syntax as other keys.
commandThe command to run. On Windows it runs through cmd.exe /d /c.
type"shell" (default) runs it detached in the background. "pane" opens a temporary pane that closes when the command exits. "popup" opens a session-modal terminal without changing the tab layout.
descriptionOptional. Popups are titled with it, and the key help (prefix+?) lists it.
width, heightPopup size, in terminal cells or a percentage such as "80%".

Legacy [keys.indexed]

Older configs may use [keys.indexed] with tabs, workspaces, and agents set to a modifier (for example agents = "alt"). flockr still parses it. For new configs, use switch_tab, switch_workspace, and focus_agent.

Reset to the defaults

flockr config reset-keys
flockr server reload-config

This backs up config.toml, then removes [keys], [keys.indexed], and [[keys.command]]. Your custom commands go too; copy them back from the backup if you want them. See Settings.

Last updated November 3, 2026