@devries-cameron20 / t3code-1 / commits / 66ebadb448
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

update doc

Julius Marminge committed Feb 15, 2026 at 14:27 UTC 66ebadb4483af03af479aa1b9805d7a1f45aa6cc
1 file changed +23 -42
KEYBINDINGS.md
+23 -42
@@ -4,19 +4,6 @@ T3 Code reads keybindings from:
4
5 - `~/.t3/keybindings.json`
6
7 -Schema source of truth:
8 -
9 -- [`packages/contracts/src/keybindings.ts`](packages/contracts/src/keybindings.ts)
10 -- [`packages/contracts/src/server.ts`](packages/contracts/src/server.ts)
11 -
12 -Server-side parsing/default resolution/merging:
13 -
14 -- [`apps/server/src/keybindings.ts`](apps/server/src/keybindings.ts)
15 -
16 -Server wiring (`server.getConfig`):
17 -
18 -- [`apps/server/src/wsServer.ts`](apps/server/src/wsServer.ts)
19 -
7 The file must be a JSON array of rules:
8
9 ```json
@@ -26,7 +13,25 @@ The file must be a JSON array of rules:
13 ]
14 ```
15
29 -## Rule Shape
16 +See the full schema for more details: [`packages/contracts/src/keybindings.ts`](packages/contracts/src/keybindings.ts)
17 +
18 +## Defaults
19 +
20 +```json
21 +[
22 + { "key": "mod+j", "command": "terminal.toggle" },
23 + { "key": "mod+d", "command": "terminal.split", "when": "terminalFocus" },
24 + { "key": "mod+shift+d", "command": "terminal.new", "when": "terminalFocus" },
25 + { "key": "mod+shift+o", "command": "chat.new" },
26 + { "key": "mod+o", "command": "editor.openFavorite" }
27 +]
28 +```
29 +
30 +For most up to date defaults, see [`DEFAULT_KEYBINDINGS` in `apps/server/src/keybindings.ts`](apps/server/src/keybindings.ts)
31 +
32 +## Configuration
33 +
34 +### Rule Shape
35
36 Each entry supports:
37
@@ -36,7 +41,7 @@ Each entry supports:
41
42 Invalid rules are ignored. Invalid config files are ignored. Warnings are logged by the server.
43
39 -## Available Commands
44 +### Available Commands
45
46 - `terminal.toggle`: open/close terminal drawer
47 - `terminal.split`: split terminal (in focused terminal context by default)
@@ -44,7 +49,7 @@ Invalid rules are ignored. Invalid config files are ignored. Warnings are logged
49 - `chat.new`: create a new chat thread for the active project
50 - `editor.openFavorite`: open current project/worktree in the last-used editor
51
47 -## Key Syntax
52 +### Key Syntax
53
54 Supported modifiers:
55
@@ -61,7 +66,7 @@ Examples:
66 - `ctrl+l`
67 - `cmd+k`
68
64 -## `when` Conditions
69 +### `when` Conditions
70
71 Currently available context keys:
72
@@ -83,31 +88,7 @@ Examples:
88
89 Unknown condition keys evaluate to `false`.
90
86 -## Defaults
87 -
88 -Built-in defaults are resolved on the server and sent to the web client via `server.getConfig`:
89 -
90 -- Source of truth: [`DEFAULT_KEYBINDINGS` in `apps/server/src/keybindings.ts`](apps/server/src/keybindings.ts)
91 -
92 -If you define any rules for a command, the default rule for that command is removed on the server.
93 -
94 -## Server-Resolved Payload
95 -
96 -`~/.t3/keybindings.json` is parsed and compiled on the server. The web client receives resolved rules and does not parse raw keybinding strings.
97 -
98 -Resolved rule payload fields:
99 -
100 -- `command`
101 -- `shortcut`
102 -- `whenAst` (optional)
103 -
104 -See:
105 -
106 -- [`packages/contracts/src/keybindings.ts`](packages/contracts/src/keybindings.ts)
107 -- [`apps/server/src/keybindings.ts`](apps/server/src/keybindings.ts)
108 -- [`apps/server/src/wsServer.ts`](apps/server/src/wsServer.ts)
109 -
110 -## Precedence
91 +### Precedence
92
93 - Rules are evaluated in array order.
94 - For a key event, the last rule where both `key` matches and `when` evaluates to `true` wins.