Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

Merge remote-tracking branch 'origin/main' into feature/cancel-recording-hotkey

Gabriel Stein232436ba922a
diff --cc src/components/SettingsPage.tsx
index 73152be23,8ac7c4679..bb79ed09d
--- a/src/components/SettingsPage.tsx
+++ b/src/components/SettingsPage.tsx
@@@ -683,7 -736,8 +737,9 @@@ export default function SettingsPage({
customReasoningApiKey,
setCustomReasoningApiKey,
setDictationKey,
+ setCancelKey,
+ meetingKey,
+ setMeetingKey,
autoLearnCorrections,
setAutoLearnCorrections,
updateTranscriptionSettings,
@@@ -2417,30 -2859,7 +2861,30 @@@ EOF`
)}
</SettingsPanelRow>
+ {/* Cancel Hotkey */}
+ <SettingsPanelRow>
+ <p className="text-xs font-medium text-muted-foreground/80 mb-2">
+ {t("settingsPage.general.hotkey.cancelTitle")}
+ </p>
+ <p className="text-xs text-muted-foreground/60 mb-2">
+ {t("settingsPage.general.hotkey.cancelDescription")}
+ </p>
+ <HotkeyInput
+ value={cancelKey}
- onChange={(newKey) => setCancelKey(newKey)}
++ onChange={setCancelKey}
+ skipListeningMode
+ />
+ {cancelKey && cancelKey !== "Escape" && (
+ <button
+ onClick={() => setCancelKey("Escape")}
+ className="mt-2 text-xs text-muted-foreground/70 hover:text-foreground transition-colors"
+ >
+ {t("settingsPage.general.hotkey.resetToDefault", { hotkey: "Escape" })}
+ </button>
+ )}
+ </SettingsPanelRow>
+
- {!isUsingGnomeHotkeys && (
+ {!isUsingNativeShortcut && (
<SettingsPanelRow>
<p className="text-xs font-medium text-muted-foreground/80 mb-2">
{t("settingsPage.general.hotkey.activationMode")}
diff --cc src/hooks/useAudioRecording.js
index 8b7ed5ee0,7a703574c..48d239b97
--- a/src/hooks/useAudioRecording.js
+++ b/src/hooks/useAudioRecording.js
@@@ -35,8 -43,7 +43,8 @@@ export const useAudioRecording = (toast
if (getSettings().pauseMediaOnDictation) {
window.electronAPI?.pauseMediaPlayback?.();
}
+ window.electronAPI?.registerCancelHotkey?.(getSettings().cancelKey || "Escape");
+ void playStartCue();
}
return didStart;
@@@ -227,17 -231,8 +235,9 @@@
};
}, [toast, onToggle, performStartRecording, performStopRecording, t]);
- const startRecording = async () => {
- return performStartRecording();
- };
-
- const stopRecording = async () => {
- return performStopRecording();
- };
-
const cancelRecording = async () => {
if (audioManagerRef.current) {
+ window.electronAPI?.unregisterCancelHotkey?.();
const state = audioManagerRef.current.getState();
if (getSettings().pauseMediaOnDictation) {
window.electronAPI?.resumeMediaPlayback?.();
diff --cc src/hooks/useSettings.ts
index b077a32f6,7c563be18..abac8a5ac
--- a/src/hooks/useSettings.ts
+++ b/src/hooks/useSettings.ts
@@@ -32,7 -32,7 +32,8 @@@ export interface ReasoningSettings
export interface HotkeySettings {
dictationKey: string;
+ cancelKey: string;
+ meetingKey: string;
activationMode: "tap" | "push";
}
@@@ -189,7 -190,7 +191,8 @@@ function useSettingsInternal()
groqApiKey: store.groqApiKey,
mistralApiKey: store.mistralApiKey,
dictationKey: store.dictationKey,
+ cancelKey: store.cancelKey,
+ meetingKey: store.meetingKey,
theme: store.theme,
setUseLocalWhisper: store.setUseLocalWhisper,
setWhisperModel: store.setWhisperModel,
@@@ -220,7 -221,7 +223,8 @@@
customReasoningApiKey: store.customReasoningApiKey,
setCustomReasoningApiKey: store.setCustomReasoningApiKey,
setDictationKey: store.setDictationKey,
+ setCancelKey: store.setCancelKey,
+ setMeetingKey: store.setMeetingKey,
setTheme: store.setTheme,
activationMode: store.activationMode,
setActivationMode: store.setActivationMode,
diff --cc src/locales/de/translation.json
index 8d38bcbf4,2305555eb..ac7965e5c
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@@ -1080,10 -1172,13 +1172,15 @@@
"activationMode": "Aktivierungsmodus",
"description": "Die Tastenkombination, die das Sprachdiktat startet und stoppt",
"resetToDefault": "Auf {{hotkey}} zurücksetzen",
- "title": "Diktat-Hotkey"
+ "title": "Diktat-Hotkey",
+ "cancelTitle": "Abbrechen-Taste",
+ "cancelDescription": "Taste zum Abbrechen einer laufenden Aufnahme"
},
+ "meetingHotkey": {
+ "title": "Meeting-Modus-Hotkey",
+ "description": "Meeting-Modus starten und das Panel an den Bildschirmrand verschieben",
+ "clear": "Hotkey entfernen"
+ },
"microphone": {
"description": "Wählen Sie das Eingabegerät für das Diktat",
"title": "Mikrofon"
diff --cc src/locales/en/translation.json
index 60c74680e,6ef06337e..03095085a
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@@ -1143,10 -1220,13 +1220,15 @@@
"activationMode": "Activation Mode",
"description": "The key combination that starts and stops voice dictation",
"resetToDefault": "Reset to {{hotkey}}",
- "title": "Dictation Hotkey"
+ "title": "Dictation Hotkey",
+ "cancelTitle": "Cancel Hotkey",
+ "cancelDescription": "Key to cancel an in-progress recording"
},
+ "meetingHotkey": {
+ "title": "Meeting Mode Hotkey",
+ "description": "Start meeting mode and snap the panel to the side of the screen",
+ "clear": "Remove hotkey"
+ },
"microphone": {
"description": "Select which input device to use for dictation",
"title": "Microphone"
diff --cc src/locales/es/translation.json
index daa18a318,6133e7e78..8d3201a48
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@@ -1084,10 -1172,13 +1172,15 @@@
"activationMode": "Modo de activación",
"description": "La combinación de teclas que inicia y detiene el dictado por voz",
"resetToDefault": "Restablecer a {{hotkey}}",
- "title": "Atajo de dictado"
+ "title": "Atajo de dictado",
+ "cancelTitle": "Atajo de cancelación",
+ "cancelDescription": "Tecla para cancelar una grabación en curso"
},
+ "meetingHotkey": {
+ "title": "Atajo modo reunión",
+ "description": "Iniciar modo reunión y ajustar el panel al lado de la pantalla",
+ "clear": "Eliminar atajo"
+ },
"microphone": {
"description": "Selecciona qué dispositivo de entrada usar para dictado",
"title": "Micrófono"
diff --cc src/locales/fr/translation.json
index 590216e1f,cd4866457..5e82d7c91
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@@ -1084,10 -1172,13 +1172,15 @@@
"activationMode": "Mode d'activation",
"description": "La combinaison de touches qui démarre et arrête la dictée vocale",
"resetToDefault": "Réinitialiser à {{hotkey}}",
- "title": "Raccourci de dictée"
+ "title": "Raccourci de dictée",
+ "cancelTitle": "Raccourci d'annulation",
+ "cancelDescription": "Touche pour annuler un enregistrement en cours"
},
+ "meetingHotkey": {
+ "title": "Raccourci mode réunion",
+ "description": "Démarrer le mode réunion et ancrer le panneau sur le côté de l'écran",
+ "clear": "Supprimer le raccourci"
+ },
"microphone": {
"description": "Sélectionnez le périphérique d'entrée à utiliser pour la dictée",
"title": "Microphone"
diff --cc src/locales/it/translation.json
index fe92c1874,5c7418746..f92ca6b59
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@@ -1084,10 -1172,13 +1172,15 @@@
"activationMode": "Modalità di attivazione",
"description": "La combinazione di tasti che avvia e ferma la dettatura vocale",
"resetToDefault": "Ripristina a {{hotkey}}",
- "title": "Scorciatoia di dettatura"
+ "title": "Scorciatoia di dettatura",
+ "cancelTitle": "Tasto di annullamento",
+ "cancelDescription": "Tasto per annullare una registrazione in corso"
},
+ "meetingHotkey": {
+ "title": "Scorciatoia modalità meeting",
+ "description": "Avvia la modalità meeting e posiziona il pannello a lato dello schermo",
+ "clear": "Rimuovi scorciatoia"
+ },
"microphone": {
"description": "Seleziona il dispositivo di ingresso da usare per la dettatura",
"title": "Microfono"
diff --cc src/locales/ja/translation.json
index fc79fff2e,e0b39acc0..843794409
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@@ -1080,10 -1172,13 +1172,15 @@@
"activationMode": "起動モード",
"description": "音声ディクテーションの開始/停止に使用するキーの組み合わせ",
"resetToDefault": "{{hotkey}}にリセット",
- "title": "ディクテーションホットキー"
+ "title": "ディクテーションホットキー",
+ "cancelTitle": "キャンセルキー",
+ "cancelDescription": "録音中の記録をキャンセルするキー"
},
+ "meetingHotkey": {
+ "title": "ミーティングモードホットキー",
+ "description": "ミーティングモードを開始し、パネルを画面の横に配置する",
+ "clear": "ホットキーを削除"
+ },
"microphone": {
"description": "ディクテーションに使用する入力デバイスを選択",
"title": "マイク"
diff --cc src/locales/pt/translation.json
index af0cae517,80580683b..2b45f539e
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@@ -1056,10 -1144,13 +1144,15 @@@
"activationMode": "Modo de ativação",
"description": "A combinação de teclas que inicia e para o ditado por voz",
"resetToDefault": "Redefinir para {{hotkey}}",
- "title": "Atalho de ditado"
+ "title": "Atalho de ditado",
+ "cancelTitle": "Atalho de cancelamento",
+ "cancelDescription": "Tecla para cancelar uma gravação em andamento"
},
+ "meetingHotkey": {
+ "title": "Atalho modo reunião",
+ "description": "Iniciar modo reunião e posicionar o painel ao lado da tela",
+ "clear": "Remover atalho"
+ },
"microphone": {
"description": "Selecione qual dispositivo de entrada usar para ditado",
"title": "Microfone"
diff --cc src/locales/ru/translation.json
index ca81a3cde,83918db87..3c2c70205
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@@ -1084,10 -1172,13 +1172,15 @@@
"activationMode": "Режим активации",
"description": "Комбинация клавиш для запуска и остановки голосовой диктовки",
"resetToDefault": "Сбросить на {{hotkey}}",
- "title": "Горячая клавиша диктовки"
+ "title": "Горячая клавиша диктовки",
+ "cancelTitle": "Клавиша отмены",
+ "cancelDescription": "Клавиша для отмены текущей записи"
},
+ "meetingHotkey": {
+ "title": "Горячая клавиша режима встречи",
+ "description": "Запустить режим встречи и закрепить панель сбоку экрана",
+ "clear": "Удалить горячую клавишу"
+ },
"microphone": {
"description": "Выберите устройство ввода для диктовки",
"title": "Микрофон"
diff --cc src/locales/zh-CN/translation.json
index 7e3746a82,3da7e17cb..571b6cadb
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@@ -1080,10 -1172,13 +1172,15 @@@
"activationMode": "激活模式",
"description": "用于开始和停止语音听写的组合键",
"resetToDefault": "重置为 {{hotkey}}",
- "title": "听写快捷键"
+ "title": "听写快捷键",
+ "cancelTitle": "取消快捷键",
+ "cancelDescription": "取消进行中录音的按键"
},
+ "meetingHotkey": {
+ "title": "会议模式快捷键",
+ "description": "启动会议模式并将面板固定到屏幕侧边",
+ "clear": "移除快捷键"
+ },
"microphone": {
"description": "选择用于听写的输入设备",
"title": "麦克风"
diff --cc src/locales/zh-TW/translation.json
index 0a6b3d07a,a16e29967..b8b2bdd49
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@@ -1080,10 -1172,13 +1172,15 @@@
"activationMode": "啟用模式",
"description": "用來開始和停止語音輸入的組合鍵",
"resetToDefault": "重置為 {{hotkey}}",
- "title": "語音輸入快捷鍵"
+ "title": "語音輸入快捷鍵",
+ "cancelTitle": "取消快捷鍵",
+ "cancelDescription": "取消進行中錄音的按鍵"
},
+ "meetingHotkey": {
+ "title": "會議模式快捷鍵",
+ "description": "啟動會議模式並將面板固定到螢幕側邊",
+ "clear": "移除快捷鍵"
+ },
"microphone": {
"description": "選擇用於語音輸入的輸入裝置",
"title": "麥克風"
diff --cc src/stores/settingsStore.ts
index b7b68a774,85321b4cc..464795268
--- a/src/stores/settingsStore.ts
+++ b/src/stores/settingsStore.ts
@@@ -135,7 -136,7 +136,8 @@@ export interface SettingsStat
setCustomReasoningApiKey: (key: string) => void;
setDictationKey: (key: string) => void;
+ setCancelKey: (key: string) => void;
+ setMeetingKey: (key: string) => void;
setActivationMode: (mode: "tap" | "push") => void;
setPreferBuiltInMic: (value: boolean) => void;
@@@ -257,7 -259,7 +260,8 @@@ export const useSettingsStore = create<
customReasoningApiKey: readString("customReasoningApiKey", ""),
dictationKey: readString("dictationKey", ""),
+ cancelKey: readString("cancelKey", "Escape"),
+ meetingKey: readString("meetingKey", ""),
activationMode: (readString("activationMode", "tap") === "push" ? "push" : "tap") as
| "tap"
| "push",
@@@ -415,17 -418,18 +420,23 @@@
window.electronAPI?.saveDictationKey?.(key);
}
},
+ setMeetingKey: (key: string) => {
+ if (isBrowser) localStorage.setItem("meetingKey", key);
+ set({ meetingKey: key });
+ },
+ setCancelKey: (key: string) => {
+ if (isBrowser) localStorage.setItem("cancelKey", key);
+ set({ cancelKey: key });
+ },
+
setActivationMode: (mode: "tap" | "push") => {
- if (isBrowser) localStorage.setItem("activationMode", mode);
- set({ activationMode: mode });
+ // Linux has no native key listener for push-to-talk — force tap
+ const effective = isBrowser && window.electronAPI?.getPlatform?.() === "linux" ? "tap" : mode;
+ if (isBrowser) localStorage.setItem("activationMode", effective);
+ set({ activationMode: effective });
if (isBrowser) {
- window.electronAPI?.notifyActivationModeChanged?.(mode);
+ window.electronAPI?.notifyActivationModeChanged?.(effective);
}
},