The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 18:30 UTC
change defailt for new termial
Julius Marminge committed
Feb 15, 2026 at 14:42 UTC
1269b5258097d75f4cb413a0612570a106e32426
3 files changed
+12
-17
KEYBINDINGS.md
+1
-1
@@ -21,7 +21,7 @@ See the full schema for more details: [`packages/contracts/src/keybindings.ts`](
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" },
24
+ { "key": "mod+n", "command": "terminal.new", "when": "terminalFocus" },
25
{ "key": "mod+shift+o", "command": "chat.new" },
26
{ "key": "mod+o", "command": "editor.openFavorite" }
27
]
apps/server/src/keybindings.ts
+7
-8
@@ -27,7 +27,7 @@ type WhenToken =
27
export const DEFAULT_KEYBINDINGS: ReadonlyArray<KeybindingRule> = [
28
{ key: "mod+j", command: "terminal.toggle" },
29
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
30
- { key: "mod+shift+d", command: "terminal.new", when: "terminalFocus" },
30
+ { key: "mod+n", command: "terminal.new", when: "terminalFocus" },
31
{ key: "mod+shift+o", command: "chat.new" },
32
{ key: "mod+o", command: "editor.openFavorite" },
33
];
@@ -39,7 +39,10 @@ function normalizeKeyToken(token: string): string {
39
}
40
41
export function parseKeybindingShortcut(value: string): KeybindingShortcut | null {
42
- const rawTokens = value.toLowerCase().split("+").map((token) => token.trim());
42
+ const rawTokens = value
43
+ .toLowerCase()
44
+ .split("+")
45
+ .map((token) => token.trim());
46
const tokens = [...rawTokens];
47
let trailingEmptyCount = 0;
48
while (tokens[tokens.length - 1] === "") {
@@ -220,9 +223,7 @@ export function parseKeybindingWhenExpression(expression: string): KeybindingWhe
223
return ast;
224
}
225
223
-export function compileResolvedKeybindingRule(
224
- rule: KeybindingRule,
225
-): ResolvedKeybindingRule | null {
226
+export function compileResolvedKeybindingRule(rule: KeybindingRule): ResolvedKeybindingRule | null {
227
const key = rule.key.trim();
228
if (key.length === 0) return null;
229
const shortcut = parseKeybindingShortcut(key);
@@ -271,9 +272,7 @@ function compileDefaultKeybindings(): ResolvedKeybindingsConfig {
272
273
const DEFAULT_RESOLVED_KEYBINDINGS = compileDefaultKeybindings();
274
274
-function mergeWithDefaultKeybindings(
275
- custom: ResolvedKeybindingsConfig,
276
-): ResolvedKeybindingsConfig {
275
+function mergeWithDefaultKeybindings(custom: ResolvedKeybindingsConfig): ResolvedKeybindingsConfig {
276
if (custom.length === 0) {
277
return [...DEFAULT_RESOLVED_KEYBINDINGS];
278
}
apps/server/src/wsServer.test.ts
+4
-8
@@ -351,7 +351,7 @@ describe("WebSocket Server", () => {
351
JSON.stringify([
352
{ key: "cmd+j", command: "terminal.toggle" },
353
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
354
- { key: "mod+shift+d", command: "terminal.new", when: "terminalFocus" },
354
+ { key: "mod+n", command: "terminal.new", when: "terminalFocus" },
355
]),
356
"utf8",
357
);
@@ -374,7 +374,7 @@ describe("WebSocket Server", () => {
374
keybindings: mergeWithDefaultsForTest([
375
{ key: "cmd+j", command: "terminal.toggle" },
376
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
377
- { key: "mod+shift+d", command: "terminal.new", when: "terminalFocus" },
377
+ { key: "mod+n", command: "terminal.new", when: "terminalFocus" },
378
]),
379
});
380
});
@@ -408,9 +408,7 @@ describe("WebSocket Server", () => {
408
expect(response.error).toBeUndefined();
409
expect(response.result).toEqual({
410
cwd: "/my/workspace",
411
- keybindings: mergeWithDefaultsForTest([
412
- { key: "mod+j", command: "terminal.toggle" },
413
- ]),
411
+ keybindings: mergeWithDefaultsForTest([{ key: "mod+j", command: "terminal.toggle" }]),
412
});
413
expect(
414
warnSpy.mock.calls.some(([message]) =>
@@ -479,9 +477,7 @@ describe("WebSocket Server", () => {
477
expect(firstResponse.error).toBeUndefined();
478
expect(firstResponse.result).toEqual({
479
cwd: "/my/workspace",
482
- keybindings: mergeWithDefaultsForTest([
483
- { key: "cmd+j", command: "terminal.toggle" },
484
- ]),
480
+ keybindings: mergeWithDefaultsForTest([{ key: "cmd+j", command: "terminal.toggle" }]),
481
});
482
483
fs.writeFileSync(