mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 23:04:06 +00:00
Allow copy/paste in terminal (#1760)
This commit is contained in:
@@ -13,6 +13,16 @@ export function useTerminal(element: Ref<HTMLElement>) {
|
||||
)
|
||||
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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user