We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afa0609 commit dbd0d7dCopy full SHA for dbd0d7d
1 file changed
src/lib/components/chat/XTerminal.svelte
@@ -105,6 +105,8 @@
105
}
106
connected = true;
107
connecting = false;
108
+ // Focus the terminal so it receives keyboard input immediately
109
+ term?.focus();
110
// Send initial resize
111
if (term && ws) {
112
ws.send(JSON.stringify({ type: 'resize', cols: term.cols, rows: term.rows }));
@@ -226,6 +228,10 @@
226
228
227
229
});
230
231
+ // Ensure all key events are processed by xterm.js and not intercepted
232
+ // by the browser or surrounding UI (fixes vi/vim keystroke handling).
233
+ term.attachCustomKeyEventHandler(() => true);
234
+
235
// Handle resize
236
term.onResize(({ cols, rows }) => {
237
if (ws && ws.readyState === WebSocket.OPEN) {
0 commit comments