Skip to content

Keybinding Editor

The Keybinding Editor provides a visual interface for browsing, searching, and customizing keyboard shortcuts. Open it from Edit → Keybinding Editor... or via the Command Palette (Ctrl+P → "Keybinding Editor").

Overview

The editor displays all active keybindings in a searchable, filterable table with five columns:

ColumnDescription
KeyThe key combination (e.g., Ctrl+S)
ActionThe machine-readable action name (e.g., save)
DescriptionHuman-readable description (e.g., "Save file")
ContextWhen the binding is active (normal, global, prompt, etc.)
SourceWhether the binding comes from the active keymap or custom user config
ShortcutAction
/ Move selection up/down
PgUp / PgDnPage up/down
Home / EndJump to first/last binding

Searching

Two search modes are available:

Press / to start a text search. Type to filter bindings by action name, description, key display, or context. Press Esc to cancel.

Press r to start a key recording search. Press any key combination to find all bindings that match that exact key. Press Tab to switch between text and key recording modes.

Filtering

ShortcutAction
cCycle context filter (All → global → normal → prompt → ...)
sCycle source filter (All → Custom → Keymap)

The current filter state is shown in the header bar.

Adding and Editing Bindings

ShortcutAction
EnterEdit the selected binding
aAdd a new binding
d or DeleteDelete a custom binding

The Edit Dialog

When adding or editing a binding, a dialog appears with three fields:

  1. Key — Press the desired key combination. The dialog starts in key recording mode.
  2. Action — Type an action name. An autocomplete popup shows matching actions as you type. Use / to navigate suggestions and Tab or Enter to accept. Only valid action names are accepted.
  3. Context — Use / to cycle through available contexts (global, normal, prompt, popup, file_explorer, menu, terminal).

Use Tab to move between fields. The dialog shows a read-only description of the selected action and warns about conflicting bindings.

Press Save to apply or Cancel to discard.

Saving Changes

Press Ctrl+S to save all pending changes to your user config file. Changes are written to the keybindings array in your config.json.

If you try to close the editor with unsaved changes, a confirmation dialog offers three options: Save, Discard, or Cancel.

How Keybindings Work

Fresh uses a layered keybinding system:

  1. Keymap — A named set of default bindings (e.g., default, emacs, macos). Set via "keymap" in your config.
  2. Custom bindings — User overrides defined in the "keybindings" array of your config file. These take precedence over keymap bindings.

Custom bindings added through the editor are appended to the keybindings array. To switch the base keymap, use View → Keybinding Style or set "keymap" in your config file.

Binding Format

Each binding in config.json has this structure:

json
{
  "keybindings": [
    {
      "key": "s",
      "modifiers": ["ctrl"],
      "action": "save",
      "when": "normal"
    }
  ]
}
FieldDescription
keyThe key name (e.g., "s", "Enter", "F1", "Up")
modifiersArray of modifier keys: "ctrl", "alt", "shift", "super"
actionThe action to trigger (see action list via autocomplete in the editor)
whenContext when this binding is active (optional, defaults to "normal")

Contexts

ContextWhen Active
globalAlways active, regardless of focus
normalWhen the text editor is focused
promptWhen an input prompt is active
popupWhen a popup (completion, hover) is open
file_explorerWhen the file explorer has focus
menuWhen a menu is open
terminalWhen the integrated terminal has focus

Released under the Apache 2.0 License