From ab623dc325f8d4eb637d31bfae94b72579cc798b Mon Sep 17 00:00:00 2001 From: "Calum H." Date: Sat, 18 Apr 2026 18:50:20 +0100 Subject: [PATCH] feat: uncomment custom key event handler (#5831) --- packages/ui/src/composables/terminal.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/ui/src/composables/terminal.ts b/packages/ui/src/composables/terminal.ts index 52bfa9a30..a5449afae 100644 --- a/packages/ui/src/composables/terminal.ts +++ b/packages/ui/src/composables/terminal.ts @@ -193,16 +193,16 @@ export function useTerminal(options: UseTerminalOptions): UseTerminalReturn { term.options.disableStdin = true term.write('\x1b[?25l') - // term.attachCustomKeyEventHandler((e) => { - // if (e.type !== 'keydown') return true - // const mod = e.ctrlKey || e.metaKey - // if (!mod) return true - // const key = e.key.toLowerCase() - // if (key === 'c' || key === 'insert' || key === 'a') { - // return false - // } - // return true - // }) + term.attachCustomKeyEventHandler((e) => { + if (e.type !== 'keydown') return true + const mod = e.ctrlKey || e.metaKey + if (!mod) return true + const key = e.key.toLowerCase() + if (key === 'c' || key === 'insert' || key === 'a') { + return false + } + return true + }) wheelHandler = (e: WheelEvent) => { e.preventDefault()