Keybindings
Customize keyboard shortcuts to fit your workflow. Keybindings are stored as a JSON file and support modifier keys plus optional context conditions.
Configuration File
Keybindings are stored in a JSON array:
- Production:
~/.shiori/userdata/keybindings.json - Development:
~/.shiori/dev/keybindings.json
Create the file if it doesn't exist. ShioriCode watches it for changes and reloads automatically.
Format
Each entry binds a key combination to a command:
[
{
"key": "mod+j",
"command": "terminal.toggle"
},
{
"key": "mod+n",
"command": "chat.new",
"when": "!terminalFocus"
}
]Key Syntax
Keys are written as modifier+key strings, joined with +:
| Modifier | Description |
|---|---|
mod | Cmd on macOS, Ctrl on Windows/Linux |
cmd | macOS Command key only |
ctrl | Control key |
shift | Shift key |
alt | Alt / Option key |
A keybinding maps one shortcut string to one command. Multi-step chords are not currently supported.
Available Commands
Workspace
| Command | Description |
|---|---|
sidebar.toggle | Show or hide the sidebar |
project.add | Add or open a project |
diff.toggle | Show or hide the diff panel |
Terminal
| Command | Description |
|---|---|
terminal.toggle | Show or hide the terminal panel |
terminal.new | Open a new terminal tab |
terminal.split | Split the focused terminal |
terminal.close | Close the current terminal tab |
Chat
| Command | Description |
|---|---|
chat.new | Start a new chat thread |
chat.newLocal | Start a new local thread in the current workspace |
Editor
| Command | Description |
|---|---|
editor.openFavorite | Open the current workspace in your preferred editor |
Thread Navigation
Built-in thread navigation commands include thread.previous, thread.next, and thread.jump.1 through thread.jump.9.
Scripts
Custom script commands use the format script.<id>.run, where the ID references a user-defined script.
Context Conditions
Use the when field to restrict a keybinding to specific contexts:
| Condition | Description |
|---|---|
terminalFocus | True when the terminal has focus |
terminalOpen | True when the terminal panel is visible |
Prefix with ! to negate (for example, !terminalFocus).
Default Keybindings
| Shortcut | Action |
|---|---|
| ⌘ J | Toggle terminal |
| ⌘ N | New chat or new terminal tab, depending on terminal focus |
| ⌘ W | Close terminal |
| ⌘ O | Add or open a project |
Additional defaults include ⌘B for the sidebar, ⌘D for diff or terminal split depending on focus, and ⌘⇧O for opening the workspace in your preferred editor.