From c6e6e3cb67d962e0bfae74db0306fdf55b0e35fc Mon Sep 17 00:00:00 2001 From: bingshuo <565183519@qq.com> Date: Mon, 18 May 2026 21:28:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=B8=E6=B8=8A:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=9B=9E=E8=BD=A6=E6=97=A0=E6=B3=95=E5=8F=91=E9=80=81=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/ftchat/chat.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/ftchat/chat.js b/frontend/ftchat/chat.js index b38c4ed..80ed626 100644 --- a/frontend/ftchat/chat.js +++ b/frontend/ftchat/chat.js @@ -482,7 +482,13 @@ setInterval(updateSlotInfo, 30000); // Keyboard shortcut: Escape to blur input - document.addEventListener('keydown', function(e) { + documenchatInput.addEventListener('keydown', function(e) { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + sendMessage(); + } + }); + chatInput.addEventListener('keydown', function(e) { if (e.key === 'Escape' && document.activeElement === chatInput) { chatInput.blur(); }