## Description When pressing Cmd+V in the prompt textarea, sometimes it triggers app exit instead of paste. ## Steps to reproduce 1. Open OpenCode 2. Type something in prompt 3. Copy text to clipboard from another app 4. Press Cmd+V 5. Expected: paste text | Actual: exits app ## Root cause In `prompt/index.tsx` lines 931-957, the handler blocked ALL meta/ctrl keys if clipboard has content, including Cmd+V.
Activity
zokan121522 commentedon Apr 17, 2026
📝 Comment 1: Explore findings
Exploración completada.
Archivos analizados:
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx- keyboard handlerpackages/opencode/src/cli/cmd/tui/component/textarea-keybindings.ts- keybindingsRoot cause: Líneas 931-957 en index.tsx bloqueaban TODOS los keys con meta/ctrl si el clipboard tenía contenido, incluyendo Cmd+V.
zokan121522 commentedon Apr 17, 2026
📝 Comment 2: Spec
Requisitos:
Escenarios:
zokan121522 commentedon Apr 17, 2026
📝 Comment 3: Design
Approach técnico:
Modificar handler onKeyDown para:
e.meta && e.name === "v"(Cmd+V)Antes:
Después:
zokan121522 commentedon Apr 17, 2026
📝 Comment 4: Tasks checklist
zokan121522 commentedon Apr 17, 2026
📝 Comment 5: Apply (implementación)
Fix aplicado en:
fix/cmd-v-pastepackages/opencode/src/cli/cmd/tui/component/prompt/index.tsxCambios:
zokan121522 commentedon Apr 17, 2026
📝 Comment 6: Verify
Resultado inicial: El fix funciona en testing inicial.
Pendiente testing completo:
github-actions commentedon Apr 17, 2026
This issue might be a duplicate of existing issues. Please check:
cmd+vpaste in TUI on macOS not working reliably (image paste focus, but covers the same key handling)cmd+keybind support on macOS in TUIFor keybind-related issues, please also check our pinned keybinds documentation: #4997
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.