Skip to content

Commit b318174

Browse files
nedtwiggclaude
andcommitted
Enable kitty keyboard protocol so Shift+Enter is distinguishable
In a stock xterm.js terminal, Shift+Enter and Enter both send `\r`, so TUIs like Claude Code can't bind them differently and both submit. Upgrading @xterm/xterm to a 6.1.0 beta and opting into `vtExtensions.kittyKeyboard` lets the terminal advertise the kitty keyboard protocol; when the inner program negotiates it, modified keys round-trip as distinct CSI u sequences. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 067ff51 commit b318174

4 files changed

Lines changed: 23 additions & 18 deletions

File tree

lib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
},
1616
"dependencies": {
1717
"@phosphor-icons/react": "^2.1.10",
18-
"@xterm/addon-fit": "^0.11.0",
19-
"@xterm/xterm": "^6.0.0",
18+
"@xterm/addon-fit": "0.12.0-beta.216",
19+
"@xterm/xterm": "6.1.0-beta.216",
2020
"clsx": "^2.1.1",
2121
"dockview-react": "^5.1.0",
2222
"react": "^19.2.0",

lib/src/lib/terminal-lifecycle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function createXtermHost(): { terminal: Terminal; fit: FitAddon; element: HTMLDi
5454
fontFamily: editorFontFamily,
5555
cursorBlink: true,
5656
theme,
57+
vtExtensions: { kittyKeyboard: true },
5758
});
5859

5960
const fit = new FitAddon();

pnpm-lock.yaml

Lines changed: 18 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

standalone/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"@tauri-apps/api": "^2.0.0",
1616
"@tauri-apps/plugin-shell": "^2.0.0",
1717
"@tauri-apps/plugin-updater": "^2.10.1",
18-
"@xterm/addon-fit": "^0.11.0",
19-
"@xterm/xterm": "^6.0.0",
18+
"@xterm/addon-fit": "0.12.0-beta.216",
19+
"@xterm/xterm": "6.1.0-beta.216",
2020
"dockview-react": "^5.1.0",
2121
"mouseterm-lib": "workspace:*",
2222
"react": "^19.0.0",

0 commit comments

Comments
 (0)