From a716000785583d1e8773ffcc7790b47812524eb2 Mon Sep 17 00:00:00 2001 From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com> Date: Wed, 30 Apr 2025 14:18:38 +0800 Subject: [PATCH] Update CommandInputBar.vue --- packages/frontend/src/components/CommandInputBar.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/frontend/src/components/CommandInputBar.vue b/packages/frontend/src/components/CommandInputBar.vue index f944e26..083738c 100644 --- a/packages/frontend/src/components/CommandInputBar.vue +++ b/packages/frontend/src/components/CommandInputBar.vue @@ -140,6 +140,11 @@ const handleCommandInputKeydown = (event: KeyboardEvent) => { emit('send-command', selectedCommand + '\n'); commandInput.value = ''; // Clear input after sending selected command } + } else if (event.ctrlKey && event.key === 'c' && commandInput.value === '') { + // Handle Ctrl+C when input is empty + event.preventDefault(); + console.log('[CommandInputBar] Ctrl+C detected with empty input. Sending SIGINT.'); + emit('send-command', '\x03'); // Send ETX character (Ctrl+C) } else if (!event.altKey && event.key === 'Enter') { // Handle regular Enter key press - send current input event.preventDefault(); // Prevent default if needed, e.g., form submission