diff --git a/frontend/src/hooks/useTerminal.ts b/frontend/src/hooks/useTerminal.ts index c267799bd5af..571a75322cb2 100644 --- a/frontend/src/hooks/useTerminal.ts +++ b/frontend/src/hooks/useTerminal.ts @@ -65,6 +65,14 @@ export const useTerminal = (commands: Command[] = []) => { } }); terminal.current.attachCustomKeyEventHandler((arg) => { + // ctrl + c to interrupt + if ( + (arg.ctrlKey || arg.metaKey) && + arg.code === "KeyC" && + arg.type === "keydown" + ) { + sendTerminalCommand("\x03"); + } if ( (arg.ctrlKey || arg.metaKey) && arg.code === "KeyV" &&