Skip to main content
Fresh uses context-aware keybindings that adapt based on what part of the editor you’re using.

Viewing Keybindings

There are several ways to discover keybindings in Fresh:

Command Palette

Press Ctrl+P (or ⌘+P on macOS) to open the command palette. Type any command name to see its assigned keybinding.

Keyboard Shortcuts View

Open Help → Keyboard Shortcuts from the menu to view the complete list of all keybindings organized by category.

Keybinding Editor

Open Edit → Keybinding Editor to customize keybindings interactively.

Keybinding Maps

Fresh supports multiple keybinding maps (styles) that you can switch between:
  • default - Fresh’s native keybindings (optimized for terminal use)
  • emacs - Emacs-style keybindings
  • vscode - VS Code-compatible shortcuts
  • vim - Vim-style modal editing
Switch between maps using View → Keybinding Style or via configuration:
{
  "active_keybinding_map": "emacs"
}

Key Contexts

Keybindings are context-sensitive. The same key can perform different actions depending on where you are:
  • Normal - Default editing context
  • Prompt - When entering text in prompts (file open, search, etc.)
  • Popup - When viewing popups (completions, hover info, etc.)
  • FileExplorer - When the file explorer has focus
  • Menu - When navigating the menu bar

Common Keybindings (Default Map)

This section shows common keybindings from the default map. For platform-specific variations and complete listings, use the in-app Help → Keyboard Shortcuts view.

File Operations

KeybindingActionDescription
Ctrl+NNewCreate new buffer
Ctrl+OOpenOpen file
Ctrl+SSaveSave current buffer
Ctrl+Shift+SSave AsSave with new name
Ctrl+WCloseClose current buffer
Ctrl+QQuitQuit editor

Editing

KeybindingActionDescription
Ctrl+ZUndoUndo last change
Ctrl+Y / Ctrl+Shift+ZRedoRedo last undone change
Ctrl+XCutCut selection
Ctrl+CCopyCopy selection
Ctrl+VPastePaste from clipboard
Ctrl+ASelect AllSelect entire buffer
Ctrl+DAdd CursorAdd cursor at next match
Ctrl+/Toggle CommentComment/uncomment lines
KeybindingActionDescription
Ctrl+PCommand PaletteOpen command palette
Ctrl+Shift+OQuick OpenQuick file open
Ctrl+GGo to LineJump to specific line
Ctrl+]Go to DefinitionJump to symbol definition
Ctrl+[Go BackNavigate backward
Alt+Left / Alt+RightNavigate HistoryMove through navigation history

Search & Replace

KeybindingActionDescription
Ctrl+FFindOpen search
Ctrl+HReplaceOpen find & replace
F3 / Ctrl+F3Find Next/PreviousJump to next/previous match
Ctrl+Shift+FFind in SelectionSearch within selection

Multi-Cursor

KeybindingActionDescription
Ctrl+DAdd Cursor Next MatchAdd cursor at next occurrence
Ctrl+Shift+LAdd Cursor to LinesAdd cursor to all selected lines
Alt+Shift+UpAdd Cursor AboveAdd cursor on line above
Alt+Shift+DownAdd Cursor BelowAdd cursor on line below
EscRemove Secondary CursorsKeep only primary cursor

Splits & Tabs

KeybindingActionDescription
Ctrl+\Split HorizontalSplit editor horizontally
Ctrl+Shift+\Split VerticalSplit editor vertically
Ctrl+TabNext BufferSwitch to next tab
Ctrl+Shift+TabPrevious BufferSwitch to previous tab
Ctrl+1..9Switch to TabSwitch to tab by number

View

KeybindingActionDescription
Ctrl+BToggle File ExplorerShow/hide file sidebar
Ctrl+Shift+PCommand PaletteOpen command palette
F1Show HelpOpen help menu

LSP (Language Server)

KeybindingActionDescription
Ctrl+SpaceTrigger CompletionShow code completions
Alt+KHover InfoShow symbol documentation
F2Rename SymbolRename symbol across workspace
Shift+F12Find ReferencesFind all references
Ctrl+.Code ActionsShow available code actions

File Explorer (when focused)

KeybindingActionDescription
Up/DownNavigateMove selection
EnterOpenOpen file/expand directory
SpaceExpand/CollapseToggle directory
nNew FileCreate new file
NNew DirectoryCreate new directory
dDeleteDelete selected item
rRenameRename selected item
hToggle HiddenShow/hide hidden files
EscFocus EditorReturn focus to editor

Customizing Keybindings

Using the Keybinding Editor

The easiest way to customize keybindings:
  1. Open Edit → Keybinding Editor
  2. Search for the action you want to rebind
  3. Click on the keybinding or “Add Binding”
  4. Press the desired key combination
  5. Save changes

Manual Configuration

Edit ~/.config/fresh/config.json:
{
  "keybindings": [
    {
      "key": "F5",
      "modifiers": [],
      "action": "format_buffer"
    },
    {
      "key": "s",
      "modifiers": ["ctrl", "shift"],
      "action": "save_as"
    },
    {
      "key": "tab",
      "modifiers": ["ctrl"],
      "action": "next_buffer",
      "when": "normal"
    }
  ]
}

Keybinding Schema

key
string
required
The key to bind. Examples: "a", "enter", "f1", "space", "tab", "escape"
modifiers
string[]
required
Modifier keys. Can include: "ctrl", "shift", "alt", "super" (or "cmd" on macOS)
action
string
required
The action to execute. See available actions below.
when
string
Context condition. Values: "normal", "prompt", "popup", "file_explorer", "menu"If omitted, defaults to "normal".
args
object
Additional arguments for actions that require parameters.

Creating Custom Keybinding Maps

You can create your own keybinding map:
{
  "keybinding_maps": {
    "my-custom-map": [
      {
        "key": "s",
        "modifiers": ["ctrl"],
        "action": "save"
      },
      {
        "key": "o",
        "modifiers": ["ctrl"],
        "action": "open"
      }
    ]
  },
  "active_keybinding_map": "my-custom-map"
}

Available Actions

To see all available actions, open the Keybinding Editor and browse the action dropdown, or use the Command Palette (Ctrl+P). Some commonly used actions:
  • save, save_as, open, new, close, quit
  • undo, redo, copy, cut, paste
  • search, replace, find_next, find_previous
  • goto_line, lsp_goto_definition, lsp_references
  • add_cursor_above, add_cursor_below, add_cursor_next_match
  • toggle_comment, format_buffer, delete_line
  • split_horizontal, split_vertical, next_split, prev_split
  • toggle_file_explorer, toggle_line_numbers, toggle_line_wrap

Debugging Keybindings

If a keybinding isn’t working as expected:

Debug Keyboard Events

Use Help → Debug Keyboard Events to see exactly what key codes your terminal sends to Fresh. This helps diagnose:
  • Missing modifier keys
  • Terminal or OS intercepting keys
  • Incorrect escape sequences
Press any key to see its code, modifiers, and event type. Press c to clear history, q or Esc to close.

Input Calibration

Some terminals send non-standard escape sequences. Use View → Calibrate Input to teach Fresh your terminal’s specific key mappings.

Platform Differences

macOS

  • Cmd (⌘) is used instead of Ctrl for many system-wide shortcuts
  • The default macOS keymap automatically adjusts for platform conventions
  • Native menu bar integration provides standard macOS shortcuts

Windows

  • Alt key behavior may differ in Windows Terminal vs other terminals
  • Some Ctrl+Shift combinations may be intercepted by the OS

Linux

  • Terminal emulator differences are most prominent on Linux
  • Use input calibration if your terminal sends unusual sequences
  • GPM (console mouse) is supported on the Linux console

See Also

Build docs developers (and LLMs) love