From 6d8a3e192b81a03ab32bfb654c7a5c4624e5c794 Mon Sep 17 00:00:00 2001 From: James Villegas Date: Thu, 7 Jul 2022 08:11:34 +0800 Subject: [PATCH] Update ctrl+c hotkey to print current text to terminal without executing it to mimic real terminal behavior --- src/Terminal/ui/TerminalInput.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Terminal/ui/TerminalInput.tsx b/src/Terminal/ui/TerminalInput.tsx index 1e4178a04..57f2cc38f 100644 --- a/src/Terminal/ui/TerminalInput.tsx +++ b/src/Terminal/ui/TerminalInput.tsx @@ -324,6 +324,7 @@ export function TerminalInput({ terminal, router, player }: IProps): React.React if (Settings.EnableBashHotkeys) { if (event.code === KEYCODE.C && event.ctrlKey && ref && ref.selectionStart === ref.selectionEnd) { event.preventDefault(); + terminal.print(`[${player.getCurrentServer().hostname} ~${terminal.cwd()}]> ${value}`); modifyInput("clearall"); }