Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/letstri/druk/llms.txt

Use this file to discover all available pages before exploring further.

Every command in Druk’s global keymap can be rebound to a chord of your choosing via the keybindings setting in your config file. Custom bindings take precedence over all built-in defaults, and any conflict or invalid value is reported with a startup warning rather than silently failing — a bad config can never cost you a key.

How to remap

Add a keybindings map to your ~/.config/druk/config.json. Each entry maps a command id to a chord string. Setting a value to an empty string or "none" removes the binding entirely, leaving the command with no key.
~/.config/druk/config.json
{
  "keybindings": {
    "git.commit": "Ctrl+Opt+C",
    "problems.next": "F8",
    "problems.prev": "F7",
    "find.replace": "Ctrl+H"
  }
}

Chord format

A valid chord must include at least one modifier: Ctrl, Opt/Alt, or a standalone function key (F1F12). A bare letter or arrow key without a modifier is rejected because it would intercept normal typing.
Example chordNotes
Ctrl+SCtrl plus a letter
Ctrl+Opt+KCtrl plus the second modifier plus a letter
F2Function key alone — no Ctrl required
Ctrl+Opt+←Arrow keys are valid key names
Ctrl+Shift+KShift is parsed as an alias for Opt/Alt
Accepted key name spellings include Unicode arrows ( ), spelled-out names (Left, ArrowLeft), and common abbreviations (PgUp, PgDn, Bksp, Del, Ins, Esc, Enter, Ret, Spc).
On macOS the second modifier is called Opt (Option, ⌥). On Linux and Windows it is Alt. Druk accepts both spellings — and also Option, Meta, Cmd, Command, Super, and Shift — and treats them all as the same modifier flag. The chord Ctrl+Opt+G and Ctrl+Alt+G are identical.
Outside the kitty keyboard protocol, Ctrl+Shift+<letter> arrives at the terminal byte-identical to Ctrl+<letter>. Druk accepts the chord but it will behave identically to the unshifted version in most terminals. Use Ctrl+Opt+<letter> instead for a second modifier that is reliably distinguishable.

Conflict resolution

Druk settles chord conflicts deterministically:
  1. Custom binding beats default — if you bind Ctrl+G to a different command, the original command loses that chord.
  2. Between two custom bindings, the command that appears earlier in the bindable table (listed below) keeps the chord; the other is left unbound. Both cases emit a startup warning in the status bar.
The settings page enforces this interactively: it refuses to accept a chord that another custom binding already holds, so you cannot create a silent conflict through the UI.

Invalid values

A chord is rejected — and the command keeps its default — when:
  • It has no modifier and is not a function key (e.g. "k" by itself)
  • It uses a reserved byte that belongs to another key:
    • Ctrl+I — same byte as Tab
    • Ctrl+[ — same byte as Escape
    • Ctrl+M — same byte as Enter
    • Ctrl+J — same byte as newline
    • Ctrl+H — same byte as Backspace
    • Ctrl+C — copies selection / quits
    • Ctrl+Space — triggers autocomplete
Rejected bindings appear in invalid at startup and are reported in the status bar.

All bindable commands

Command idDefault chord(s)Description
paletteF1, Ctrl+Opt+PCommand palette
peekCtrl+KPeek at every key
openCtrl+P, Ctrl+OOpen file…
saveCtrl+SSave file
gotoCtrl+GGo to line…
find.fileCtrl+FFind in current file
find.projectCtrl+RFind in project
find.replace(none)Replace in current file
file.newCtrl+NNew file
file.newDirCtrl+Opt+NNew folder
tabs.closeCtrl+WClose tab
tabs.reopenCtrl+Opt+TReopen closed tab
tabs.switchCtrl+TSwitch to open tab
tabs.prevCtrl+Opt+←Previous tab
tabs.nextCtrl+Opt+→Next tab
tabs.closeOthers(none)Close other tabs
tabs.closeAll(none)Close all tabs
view.sidebarCtrl+BShow / hide sidebar
view.gitCtrl+Opt+GSource control panel
view.markdownCtrl+Opt+MMarkdown: rendered / source
view.focus(none)Focus tree / editor
git.diffFile(none)Diff current file
git.commit(none)Commit…
git.push(none)Push
git.compare(none)Compare branches
problems.list(none)List problems
problems.next(none)Next problem
problems.prev(none)Previous problem
settings(none)Settings
help(none)Keyboard shortcuts
quitCtrl+QQuit

Config example

~/.config/druk/config.json
{
  "keybindings": {
    "git.commit": "Ctrl+Opt+C",
    "problems.next": "F8",
    "problems.prev": "F7"
  }
}
This example gives three previously unbound commands their own keys while leaving all other defaults untouched.

Build docs developers (and LLMs) love