Keybinds
Customize your keyboard shortcuts.
Customize Dropstone's keyboard shortcuts with keymap in tui.json.
keymap is merged with the built-in defaults, so you only need to configure the shortcuts you want to change.
The older keybinds field is still accepted as a migration fallback but is deprecated. If keymap is present, Dropstone ignores keybinds.
Leader key
Dropstone uses a leader key for many shortcuts. This avoids conflicts in your terminal.
By default, ctrl+x is the leader key and leader shortcuts require you to first press the leader key and then the shortcut. For example, to start a new session you first press ctrl+x and then press n.
You do not need to use a leader key, but we recommend doing so.
Minimal example
{
"$schema": "https://dropstone.io/schema/tui.json",
"keymap": {
"leader": "ctrl+x",
"leader_timeout": 2000,
"sections": {
"global": {
"command.palette.show": "ctrl+p",
"session.new": "<leader>n",
"session.list": "<leader>l"
},
"session": {
"session.compact": "<leader>c",
"session.undo": "<leader>u",
"session.redo": "<leader>r"
},
"input": {
"input.submit": "return",
"input.newline": ["shift+return", "ctrl+return", "alt+return", "ctrl+j"]
}
}
}
}
Keymap structure
keymap.sections is grouped by semantic area. Each section contains command names and the key sequence that triggers them.
| Field | Description |
|---|---|
leader | The key used by <leader> sequences. Defaults to ctrl+x. |
leader_timeout | How long Dropstone waits for the next key after the leader key, in milliseconds. Defaults to 2000. |
sections | A map of UI areas to command bindings. |
Binding values
A string can contain one shortcut or multiple comma-separated shortcuts. You can also use an array for multiple shortcuts, or "none"/false to disable a command.
{
"$schema": "https://dropstone.io/schema/tui.json",
"keymap": {
"sections": {
"session": {
"session.compact": "none",
"session.export": "<leader>x,ctrl+shift+x",
"session.copy": ["<leader>y", "ctrl+shift+c"]
}
}
}
}
For advanced cases, use an object with key, event, preventDefault, or fallthrough.
{
"$schema": "https://dropstone.io/schema/tui.json",
"keymap": {
"sections": {
"prompt": {
"prompt.paste": {
"key": "ctrl+v",
"preventDefault": false
}
}
}
}
}
Keymap reference
These are the user-facing commands you can bind. Commands set to "none" are available to bind but disabled by default.
{
"$schema": "https://dropstone.io/schema/tui.json",
"keymap": {
"leader": "ctrl+x",
"leader_timeout": 2000,
"sections": {
"global": {
"command.palette.show": "ctrl+p",
"session.list": "<leader>l",
"session.new": "<leader>n",
"model.list": "<leader>m",
"model.cycle_recent": "f2",
"model.cycle_recent_reverse": "shift+f2",
"agent.list": "<leader>a",
"agent.cycle": "tab",
"agent.cycle.reverse": "shift+tab",
"variant.cycle": "ctrl+t",
"variant.list": "none",
"help.show": "none",
"app.exit": "ctrl+c,ctrl+d,<leader>q",
"terminal.suspend": "ctrl+z"
},
"session": {
"session.rename": "ctrl+r",
"session.timeline": "<leader>g",
"session.fork": "none",
"session.compact": "<leader>c",
"session.undo": "<leader>u",
"session.redo": "<leader>r",
"session.sidebar.toggle": "<leader>b",
"session.toggle.conceal": "<leader>h",
"session.page.up": "pageup,ctrl+alt+b",
"session.page.down": "pagedown,ctrl+alt+f",
"session.line.up": "ctrl+alt+y",
"session.line.down": "ctrl+alt+e",
"session.half.page.up": "ctrl+alt+u",
"session.half.page.down": "ctrl+alt+d",
"session.first": "ctrl+g,home",
"session.last": "ctrl+alt+g,end",
"messages.copy": "<leader>y",
"session.copy": "none",
"session.export": "<leader>x",
"session.child.first": "<leader>down",
"session.parent": "up",
"session.child.next": "right",
"session.child.previous": "left"
},
"prompt": {
"prompt.submit": "none",
"prompt.editor": "<leader>e",
"session.interrupt": "escape",
"prompt.clear": "ctrl+c",
"prompt.paste": {
"key": "ctrl+v",
"preventDefault": false
},
"prompt.history.previous": "up",
"prompt.history.next": "down"
},
"autocomplete": {
"prompt.autocomplete.prev": "up,ctrl+p",
"prompt.autocomplete.next": "down,ctrl+n",
"prompt.autocomplete.hide": "escape",
"prompt.autocomplete.select": "return",
"prompt.autocomplete.complete": "tab"
},
"input": {
"input.submit": "return",
"input.newline": "shift+return,ctrl+return,alt+return,ctrl+j",
"input.move.left": "left,ctrl+b",
"input.move.right": "right,ctrl+f",
"input.move.up": "up",
"input.move.down": "down",
"input.select.left": "shift+left",
"input.select.right": "shift+right",
"input.select.up": "shift+up",
"input.select.down": "shift+down",
"input.line.home": "ctrl+a",
"input.line.end": "ctrl+e",
"input.select.line.home": "ctrl+shift+a",
"input.select.line.end": "ctrl+shift+e",
"input.visual.line.home": "alt+a",
"input.visual.line.end": "alt+e",
"input.select.visual.line.home": "alt+shift+a",
"input.select.visual.line.end": "alt+shift+e",
"input.buffer.home": "home",
"input.buffer.end": "end",
"input.select.buffer.home": "shift+home",
"input.select.buffer.end": "shift+end",
"input.delete.line": "ctrl+shift+d",
"input.delete.to.line.end": "ctrl+k",
"input.delete.to.line.start": "ctrl+u",
"input.backspace": "backspace,shift+backspace",
"input.delete": "ctrl+d,delete,shift+delete",
"input.undo": "ctrl+-,super+z",
"input.redo": "ctrl+.,super+shift+z",
"input.word.forward": "alt+f,alt+right,ctrl+right",
"input.word.backward": "alt+b,alt+left,ctrl+left",
"input.select.word.forward": "alt+shift+f,alt+shift+right",
"input.select.word.backward": "alt+shift+b,alt+shift+left",
"input.delete.word.forward": "alt+d,alt+delete,ctrl+delete",
"input.delete.word.backward": "ctrl+w,ctrl+backspace,alt+backspace",
"input.select.all": "super+a"
},
"dialog_select": {
"dialog.select.prev": "up,ctrl+p",
"dialog.select.next": "down,ctrl+n",
"dialog.select.page_up": "pageup",
"dialog.select.page_down": "pagedown",
"dialog.select.home": "home",
"dialog.select.end": "end",
"dialog.select.submit": "return"
},
"dialog_actions": {
"dialog.action.toggle": "space",
"dialog.action.delete": "ctrl+d",
"dialog.action.rename": "ctrl+r"
},
"permission": {
"permission.reject.cancel": "ctrl+c,ctrl+d,<leader>q",
"permission.prompt.escape": "ctrl+c,ctrl+d,<leader>q",
"permission.prompt.fullscreen": "ctrl+f"
},
"question": {
"question.reject": "ctrl+c,ctrl+d,<leader>q",
"question.edit.clear": "ctrl+c"
},
"home_tips": {
"tips.toggle": "<leader>h"
}
}
}
}
Legacy keybinds
keybinds is deprecated. It is kept so existing configs continue to work while users migrate to keymap.
Only use keybinds when keymap is not present. If both fields are set, keymap wins and keybinds are ignored for shortcut resolution.
{
"$schema": "https://dropstone.io/schema/tui.json",
"keybinds": {
"command_list": "ctrl+p",
"session_new": "<leader>n",
"session_compact": "<leader>c"
}
}
Windows defaults:
On native Windows, the defaults for undo and terminal suspend are different for both keymap and legacy keybinds:
input.undodefaults toctrl+z,ctrl+-,super+zwhen not explicitly configured (thectrl+zbinding is added because Windows terminals do not support POSIX suspend).terminal.suspendis disabled because native Windows terminals do not support POSIX suspend.
Built-in input shortcuts
The prompt input supports common Readline/Emacs-style shortcuts for editing text. These are built-in defaults: you can override them in the input section of tui.json above.
| Shortcut | Action |
|---|---|
ctrl+a | Move to start of current line |
ctrl+e | Move to end of current line |
ctrl+b | Move cursor back one character |
ctrl+f | Move cursor forward one character |
alt+b | Move cursor back one word |
alt+f | Move cursor forward one word |
ctrl+d | Delete character under cursor |
ctrl+k | Kill to end of line |
ctrl+u | Kill to start of line |
ctrl+w | Kill previous word |
alt+d | Kill next word |
ctrl+t | Transpose characters |
ctrl+g | Cancel popovers / abort running response |
Shift+Enter
Some terminals don't send modifier keys with Enter by default. You may need to configure your terminal to send Shift+Enter as an escape sequence.
Windows Terminal
Open your settings.json at:
%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
Add this to the root-level actions array:
"actions": [
{
"command": {
"action": "sendInput",
"input": "\u001b[13;2u"
},
"id": "User.sendInput.ShiftEnterCustom"
}
]
Add this to the root-level keybindings array:
"keybindings": [
{
"keys": "shift+enter",
"id": "User.sendInput.ShiftEnterCustom"
}
]
Save the file and restart Windows Terminal or open a new tab.