Keybinds
PersistenceAI has a comprehensive list of keybinds that you can customize through the PersistenceAI config.
Leader Key
PersistenceAI uses a leader key for most keybinds. This avoids conflicts in your terminal.
By default, Ctrl+X is the leader key and most actions 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.
Configuration
Keybinds can be customized in your configuration file (pai.json or pai.jsonc):
{
"keybinds": {
"leader": "ctrl+x",
"app_exit": "ctrl+c,ctrl+d,<leader>q",
"editor_open": "<leader>e",
"theme_list": "<leader>t",
"sidebar_toggle": "<leader>b",
"username_toggle": "none",
"status_view": "<leader>s",
"session_export": "<leader>x",
"session_new": "<leader>n",
"session_list": "<leader>l",
"session_timeline": "<leader>g",
"session_share": "none",
"session_unshare": "none",
"session_interrupt": "escape",
"session_compact": "<leader>c",
"session_child_cycle": "<leader>+right",
"session_child_cycle_reverse": "<leader>+left",
"messages_page_up": "pageup",
"messages_page_down": "pagedown",
"messages_half_page_up": "ctrl+alt+u",
"messages_half_page_down": "ctrl+alt+d",
"messages_first": "ctrl+g,home",
"messages_last": "ctrl+alt+g,end",
"messages_copy": "<leader>y",
"messages_undo": "<leader>u",
"messages_redo": "<leader>r",
"messages_last_user": "none",
"messages_toggle_conceal": "<leader>h",
"model_list": "<leader>m",
"model_cycle_recent": "f2",
"model_cycle_recent_reverse": "shift+f2",
"command_list": "ctrl+p",
"agent_list": "<leader>a",
"agent_cycle": "tab",
"agent_cycle_reverse": "shift+tab",
"input_clear": "ctrl+c",
"input_paste": "ctrl+v",
"input_submit": "enter",
"input_newline": "shift+enter,ctrl+j",
"history_previous": "up",
"history_next": "down"
}
}
Leader Key Syntax
- Replaced with the leader key (default: Ctrl+X)Example: = Ctrl+X then N
Multiple Keybind Options
Some keybinds support multiple options (comma-separated):
{
"app_exit": "ctrl+c,ctrl+d,<leader>q",
"input_newline": "shift+return,ctrl+j"
}
The first matching keybind will be used.
Disabling Keybinds
Set a keybind to "none" to disable it:
{
"session_share": "none",
"username_toggle": "none"
}
Application-Level Keybinds
Application Control
Keybind | Default | Description |
|---|---|---|
app_exit | Ctrl+C, Ctrl+D, | Exit the application |
terminal_suspend | Ctrl+Z | Suspend terminal (send SIGTSTP) |
Session Management
Keybind | Default | Description |
|---|---|---|
session_new | | Create a new session |
session_list | | List all sessions |
session_export | | Export session to editor |
session_timeline | | Show session timeline |
session_share | none | Share current session |
session_unshare | none | Unshare current session |
session_interrupt | Escape | Interrupt current session |
session_compact | | Compact the session |
session_child_cycle | (Right Arrow) | Next child session |
session_child_cycle_reverse | (Left Arrow) | Previous child session |
Message Navigation
Keybind | Default | Description |
|---|---|---|
messages_page_up | PageUp | Scroll messages up by one page |
messages_page_down | PageDown | Scroll messages down by one page |
messages_half_page_up | Ctrl+Alt+U | Scroll messages up by half page |
messages_half_page_down | Ctrl+Alt+D | Scroll messages down by half page |
messages_first | Ctrl+G, Home | Navigate to first message |
messages_last | Ctrl+Alt+G, End | Navigate to last message |
messages_last_user | none | Navigate to last user message |
messages_copy | | Copy message |
messages_undo | | Undo message |
messages_redo | | Redo message |
messages_toggle_conceal | | Toggle code block concealment in messages |
Agent & Model Management
Keybind | Default | Description |
|---|---|---|
agent_list | | List agents |
agent_cycle | Tab | Next agent |
agent_cycle_reverse | Shift+Tab | Previous agent |
model_list | | List available models |
model_cycle_recent | F2 | Next recently used model |
model_cycle_recent_reverse | Shift+F2 | Previous recently used model |
Input/Prompt Keybindings
Keybind | Default | Description |
|---|---|---|
input_clear | Ctrl+C | Clear input field |
input_paste | Ctrl+V | Paste from clipboard |
input_submit | Enter | Submit input |
input_newline | Shift+Enter, Ctrl+J | Insert newline in input |
history_previous | ↑ (Up Arrow) | Previous history item |
history_next | ↓ (Down Arrow) | Next history item |
Commands & Dialogs
Keybind | Default | Description |
|---|---|---|
command_list | Ctrl+P | List available commands |
editor_open | | Open external editor |
theme_list | | List available themes |
sidebar_toggle | | Toggle sidebar |
status_view | | View status |
scrollbar_toggle | none | Toggle session scrollbar |
username_toggle | none | Toggle username visibility |
tool_details | none | Toggle tool details visibility |
Editor Pane Keybindings
These shortcuts work when the editor is focused.
File Operations
Shortcut | Action | Description |
|---|---|---|
Ctrl+S | Save file | Saves the current file (only if modified) |
Ctrl+F | Toggle search | Opens/closes the search bar |
Escape | Close search | Closes search bar when search is visible |
Code Navigation & LSP Features
Shortcut | Action | Description |
|---|---|---|
Ctrl+Space | Trigger autocomplete | Opens code completion suggestions at cursor position |
F12 or Ctrl+G | Go to definition | Navigate to the definition of the symbol under cursor (LSP) |
Ctrl+I | Show hover info | Display type information and documentation for symbol under cursor |
Ctrl+Shift+M or F8 | Toggle diagnostics | Show/hide the diagnostics panel with errors and warnings |
Undo/Redo
Shortcut | Action | Description |
|---|---|---|
Ctrl+Z | Undo | Undo last change (per-file history) |
Ctrl+Y | Redo | Redo last undone change |
Ctrl+Shift+Z | Redo | Alternative redo shortcut |
Workspace & Editor Toggle Shortcuts
These shortcuts work globally (when no dialog is open).
Shortcut | Action | Description |
|---|---|---|
Ctrl+B | Toggle workspace | Show/hide file explorer pane |
Ctrl+E | Toggle editor | Show/hide editor pane |
Pane Resize Shortcuts
Workspace Resize (when workspace visible)
Shortcut | Action | Description |
|---|---|---|
Shift+Left | Shrink workspace | Decrease workspace width by 2 characters (min: 15) |
Shift+Right | Expand workspace | Increase workspace width by 2 characters (max: 50) |
Ctrl+Shift+Left | Shrink workspace | Alternative: Decrease workspace width by 2 characters |
Ctrl+Shift+Right | Expand workspace | Alternative: Increase workspace width by 2 characters |
Editor Resize (when editor visible)
Shortcut | Action | Description |
|---|---|---|
Ctrl+Shift+, (Comma) | Shrink editor | Decrease editor width by 5 characters (min: 30) |
Ctrl+Shift+. (Period) | Expand editor | Increase editor width by 5 characters (max: screen width - 50) |
Special Features
@ File Search
Press @ in the chat input to fuzzy search for files and agents in your project.
Type @ followed by a filename or path
Use arrow keys to navigate suggestions
Press Enter to select
Works for both files and agents
Example:
How does authentication work in @src/auth/login.ts
Command Palette
Press Ctrl+P to open the command palette with all available commands.
Quick Reference
Most Used Shortcuts
Editor:Ctrl+S - Save fileCtrl+F - SearchCtrl+Space - AutocompleteF12 or Ctrl+G - Go to definitionCtrl+I - Hover infoCtrl+Shift+M or F8 - Toggle diagnosticsCtrl+Z - UndoCtrl+Y - RedoCtrl+B - Toggle workspaceCtrl+E - Toggle editorShift+←/→ - Resize workspaceEnter - Submit messageShift+Enter - NewlineCtrl+P - Command palette↑/↓ - History navigation@ - File/agent searchN (default: Ctrl+X N) - New sessionL (default: Ctrl+X L) - List sessionsEscape - Interrupt sessionPageUp/PageDown - Scroll messages→/← - Navigate child sessionsTab/Shift+Tab - Cycle agentsNotes
Ctrl+X by default) to avoid conflicts with terminal shortcuts.For a complete reference, see the Full Keybindings Reference.