Skip to content

Commit f1dccfc

Browse files
Merge branch 'fix-shortcuts-on-desktop-0yna'
2 parents a3a059c + 3ba7be9 commit f1dccfc

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

desktop/resources/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
</div>
310310
</div>
311311

312-
<iframe id="vibora-frame" sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-modals allow-downloads"></iframe>
312+
<iframe id="vibora-frame" sandbox="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-modals allow-downloads allow-clipboard-read allow-clipboard-write"></iframe>
313313

314314
<div id="zoom-trigger"></div>
315315
<div id="zoom-controls">

src/hooks/use-terminal-ws.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,14 +537,24 @@ export function useTerminalWS(options: UseTerminalWSOptions = {}): UseTerminalWS
537537
(terminalId: string, xterm: XTerm, options?: AttachXtermOptions) => {
538538
xtermMapRef.current.set(terminalId, xterm)
539539

540-
// Handle Shift+Enter to insert a newline for Claude Code multi-line input
540+
// Handle special keyboard shortcuts
541541
xterm.attachCustomKeyEventHandler((event: KeyboardEvent) => {
542+
// Handle Shift+Enter to insert a newline for Claude Code multi-line input
542543
if (event.type === 'keydown' && event.shiftKey && event.key === 'Enter') {
543544
event.preventDefault()
544545
event.stopPropagation()
545546
writeToTerminal(terminalId, '\n')
546547
return false // Prevent xterm from processing (would send regular CR)
547548
}
549+
550+
// Handle Cmd+A (Mac) / Ctrl+A (Windows/Linux) for select all
551+
// xterm.js doesn't bind this by default since Ctrl+A is readline's "go to beginning"
552+
if (event.type === 'keydown' && (event.metaKey || event.ctrlKey) && event.key === 'a') {
553+
event.preventDefault()
554+
xterm.selectAll()
555+
return false
556+
}
557+
548558
return true // Allow all other keys to be processed normally
549559
})
550560

0 commit comments

Comments
 (0)