From fb92eb199e9def7ddbd467a564bde16c00cb7e84 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sat, 3 Jan 2026 19:57:59 +0700 Subject: [PATCH] feat(input): add Cmd+D keyboard shortcut for dictation on web MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- packages/app/src/components/message-input.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/app/src/components/message-input.tsx b/packages/app/src/components/message-input.tsx index 3007015eb..edac26204 100644 --- a/packages/app/src/components/message-input.tsx +++ b/packages/app/src/components/message-input.tsx @@ -189,6 +189,23 @@ export function MessageInput({ enableDuration: true, }); + // Cmd+D to toggle dictation on web + useEffect(() => { + if (!IS_WEB) return; + function handleKeyDown(event: KeyboardEvent) { + if ((event.metaKey || event.ctrlKey) && event.key === "d") { + event.preventDefault(); + if (isDictating) { + cancelDictation(); + } else { + startDictation(); + } + } + } + window.addEventListener("keydown", handleKeyDown); + return () => window.removeEventListener("keydown", handleKeyDown); + }, [isDictating, cancelDictation, startDictation]); + // Animate overlay useEffect(() => { const showOverlay =