mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
feat(input): add Cmd+D keyboard shortcut for dictation on web
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user