Skip to content

Commit ff8edb9

Browse files
grimmerkclaude
andcommitted
fix: support Cmd+←/→ in xterm (beginning/end of line)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e0d73b5 commit ff8edb9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/terminal-tab.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ const TerminalTab = ({ visible }: { visible: boolean }) => {
3636
term.attachCustomKeyEventHandler((e) => {
3737
if (e.metaKey && ['1', '2', '3', '[', ']'].includes(e.key)) return false;
3838
if (e.ctrlKey && e.key === 'Tab') return false;
39+
// Cmd+←/→ → beginning/end of line
40+
if (e.type === 'keydown' && e.metaKey && e.key === 'ArrowLeft') { term.input('\x01'); return false; }
41+
if (e.type === 'keydown' && e.metaKey && e.key === 'ArrowRight') { term.input('\x05'); return false; }
3942
return true;
4043
});
4144

0 commit comments

Comments
 (0)