From 467fb5423168c6cbfa852313fdde3c0116ff4d8d Mon Sep 17 00:00:00 2001 From: Kexiang Shan Date: Wed, 25 Feb 2026 17:57:40 +0900 Subject: [PATCH] fix(web): add Shift+Enter keyboard shortcut to send messages (#209) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On iPadOS with a hardware keyboard, `isTouch` is true (via pointer:coarse) so submitOnEnter is disabled and there's no keyboard-based way to send. Add Shift+Enter as a send shortcut that works on all platforms without changing existing behavior — desktop Enter-to-send is preserved. Closes #175 via [HAPI](https://hapi.run) Co-authored-by: HAPI Co-authored-by: Claude Opus 4.6 --- web/src/components/AssistantChat/HappyComposer.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/src/components/AssistantChat/HappyComposer.tsx b/web/src/components/AssistantChat/HappyComposer.tsx index fdb4707f..28f4180c 100644 --- a/web/src/components/AssistantChat/HappyComposer.tsx +++ b/web/src/components/AssistantChat/HappyComposer.tsx @@ -258,6 +258,15 @@ export function HappyComposer(props: { return } + // Shift+Enter sends the message (works on all platforms including iPadOS with keyboard) + if (key === 'Enter' && e.shiftKey) { + e.preventDefault() + if (!canSend) return + api.composer().send() + setShowContinueHint(false) + return + } + if (suggestions.length > 0) { if (key === 'ArrowUp') { e.preventDefault() @@ -308,6 +317,8 @@ export function HappyComposer(props: { onPermissionModeChange, permissionMode, permissionModes, + canSend, + api, haptic ])