Skip to main content

keymap.toml

Layers

Yazi organizes keybindings into 8 layers:

LayerContext
[mgr]Main file manager
[tasks]Tasks overlay
[spot]Spotlight preview
[pick]Pick list
[input]Input prompt
[confirm]Confirmation dialog
[cmp]Completions menu
[help]Help overlay

Override Modes

ModeBehavior
prepend_keymapHigher priority than defaults; recommended for most customizations
append_keymapLower priority than defaults
keymapFull override — replaces all built-in bindings for that layer
tip

Prefer prepend_keymap over keymap to stay compatible with future Yazi updates.

Key Notation

NotationKey(s)
azLowercase letters
AZUppercase letters
<Space>Space
<Enter>Enter / Return
<Tab>Tab
<Esc>Escape
<Up>, <Down>, <Left>, <Right>Arrow keys
<F1><F19>Function keys

Modifiers

PrefixModifier
<S->Shift
<C->Control
<A->Alt
<D->Super / Command (macOS)
CSI u Protocol

The CSI u protocol is required for:

  • Distinguishing <Tab> from <C-i>
  • Distinguishing <Esc> from <C-[>
  • Using the <D-> (Super) modifier

Most modern terminals support CSI u. If <D-> bindings do not work, verify your terminal emulator supports this protocol.

Binding Keys

Only one TOML style is allowed per keymap file — either array-of-tables or inline array (not both).

# Array-of-tables style
[[mgr]]
prepend_keymap = [
{ on = "<C-g>", run = "escape", desc = "Cancel" },
]
# Inline array style
[mgr]
prepend_keymap = [
{ on = "<C-g>", run = "escape", desc = "Cancel" },
]

Disabling Keys

Use the noop action to disable a built-in keybinding:

[[mgr]]
prepend_keymap = [
{ on = "<C-s>", run = "noop", desc = "Disable Ctrl-S" },
]