From cd0aa192f52e670b51deffc42c4a77f061b529a4 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sun, 19 Sep 2021 03:29:36 -0400 Subject: [PATCH] fix terminal not cancelling. --- src/Terminal/Terminal.ts | 1 + src/Terminal/ui/TerminalInput.tsx | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Terminal/Terminal.ts b/src/Terminal/Terminal.ts index 8039090ec..4ef407a75 100644 --- a/src/Terminal/Terminal.ts +++ b/src/Terminal/Terminal.ts @@ -245,6 +245,7 @@ export class Terminal implements ITerminal { this.print("Cancelled"); } this.action = null; + console.log("done"); TerminalEvents.emit(); } diff --git a/src/Terminal/ui/TerminalInput.tsx b/src/Terminal/ui/TerminalInput.tsx index 68048c9f2..a0c86cf87 100644 --- a/src/Terminal/ui/TerminalInput.tsx +++ b/src/Terminal/ui/TerminalInput.tsx @@ -149,7 +149,6 @@ export function TerminalInput({ terminal, router, player }: IProps): React.React useEffect(() => { function keyDown(this: Document, event: KeyboardEvent): void { if (terminal.contractOpen) return; - if (event.metaKey || event.ctrlKey) return; const ref = terminalInput.current; if (ref) ref.focus(); // Cancel action