feat: uncomment custom key event handler (#5831)

This commit is contained in:
Calum H.
2026-04-18 18:50:20 +01:00
committed by GitHub
parent bb6e24640c
commit ab623dc325

View File

@@ -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()