diff --git a/src/hooks/bottomPanelTabs/useTerminal.ts b/src/hooks/bottomPanelTabs/useTerminal.ts index 4885119f5..0709a23bb 100644 --- a/src/hooks/bottomPanelTabs/useTerminal.ts +++ b/src/hooks/bottomPanelTabs/useTerminal.ts @@ -13,6 +13,16 @@ export function useTerminal(element: Ref) { ) terminal.loadAddon(fitAddon) + terminal.attachCustomKeyEventHandler((event) => { + if (event.type === 'keydown' && (event.ctrlKey || event.metaKey)) { + if (event.key === 'c' || event.key === 'v') { + // Allow default browser copy/paste handling + return false + } + } + return true + }) + onMounted(async () => { terminal.open(element.value) })