Keybindings
Pi supports fully customizable keybindings. Configure them in your settings file under the keybindings key.
Keys are expressed as modifier+key strings. Multiple modifiers are joined with +:
Examples: ctrl+a, alt+d, ctrl+shift+k, alt+f
Special key names: enter, tab, escape, backspace, delete, up, down, left, right, home, end, pageup, pagedown, space.
All Actions
Cursor Movement
Deletion
Text Input
Kill Ring
Clipboard
Application
Session
Models & Thinking
Display
Message Queue
Selection
Session Picker
These bindings are active when the session picker is open:
Custom Configuration
Add a keybindings object to your settings file. Each key is an action name and each value is a key string or array of key strings:
{
"keybindings": {
"input.submit": "ctrl+enter",
"input.newline": "enter",
"cursor.home": ["home", "ctrl+a"],
"cursor.end": ["end", "ctrl+e"],
"app.quit": "ctrl+q",
"session.new": "ctrl+shift+n"
}
}
Emacs Keybindings
An Emacs-inspired configuration:
{
"keybindings": {
"cursor.left": "ctrl+b",
"cursor.right": "ctrl+f",
"cursor.wordLeft": "alt+b",
"cursor.wordRight": "alt+f",
"cursor.home": "ctrl+a",
"cursor.end": "ctrl+e",
"cursor.up": "ctrl+p",
"cursor.down": "ctrl+n",
"delete.charLeft": "backspace",
"delete.charRight": "ctrl+d",
"delete.wordLeft": "alt+backspace",
"delete.wordRight": "alt+d",
"delete.toLineStart": "ctrl+u",
"delete.toLineEnd": "ctrl+k",
"killRing.yank": "ctrl+y",
"killRing.yankPop": "alt+y"
}
}
Vim Keybindings
A Vim-inspired configuration (for insert-mode-like behavior):
{
"keybindings": {
"cursor.left": "left",
"cursor.right": "right",
"cursor.wordLeft": "ctrl+left",
"cursor.wordRight": "ctrl+right",
"cursor.home": "home",
"cursor.end": "end",
"cursor.up": "up",
"cursor.down": "down",
"delete.charLeft": "backspace",
"delete.charRight": "delete",
"delete.wordLeft": "ctrl+w",
"delete.toLineEnd": "ctrl+k",
"delete.toLineStart": "ctrl+u",
"app.escape": "escape",
"input.submit": "enter"
}
}
Tip
Custom keybindings completely replace the default for that action. If you want multiple keys for one action, use an array.