Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
refactor: remove cancel hotkey setting, hardcode Escape
Gabriel Stein1b8ff618a968
diff --git a/src/components/SettingsPage.tsx b/src/components/SettingsPage.tsxindex bb79ed09d..8ac7c4679 100644--- a/src/components/SettingsPage.tsx+++ b/src/components/SettingsPage.tsx@@ -708,7 +708,6 @@ export default function SettingsPage({ activeSection = "general" }: SettingsPagegroqApiKey,mistralApiKey,dictationKey,- cancelKey,activationMode,setActivationMode,preferBuiltInMic,@@ -737,7 +736,6 @@ export default function SettingsPage({ activeSection = "general" }: SettingsPagecustomReasoningApiKey,setCustomReasoningApiKey,setDictationKey,- setCancelKey,meetingKey,setMeetingKey,autoLearnCorrections,@@ -2861,29 +2859,6 @@ 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={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>-{!isUsingNativeShortcut && (<SettingsPanelRow><p className="text-xs font-medium text-muted-foreground/80 mb-2">diff --git a/src/components/ui/HotkeyInput.tsx b/src/components/ui/HotkeyInput.tsxindex cc7f76fb8..e2066eb5a 100644--- a/src/components/ui/HotkeyInput.tsx+++ b/src/components/ui/HotkeyInput.tsx@@ -147,7 +147,6 @@ export interface HotkeyInputProps {disabled?: boolean;autoFocus?: boolean;validate?: (hotkey: string) => string | null | undefined;- skipListeningMode?: boolean;}export function mapKeyboardEventToHotkey(e: KeyboardEvent): string | null {@@ -189,7 +188,6 @@ export function HotkeyInput({autoFocus = false,variant = "default",validate,- skipListeningMode = false,}: HotkeyInputProps & HotkeyInputVariant) {const { t } = useTranslation();const [isCapturing, setIsCapturing] = useState(false);@@ -403,20 +401,19 @@ export function HotkeyInput({setIsCapturing(true);setValidationWarning(null);clearFnHeld();- if (!skipListeningMode) window.electronAPI?.setHotkeyListeningMode?.(true);+ window.electronAPI?.setHotkeyListeningMode?.(true);}- }, [disabled, clearFnHeld, skipListeningMode]);+ }, [disabled, clearFnHeld]);const handleBlur = useCallback(() => {setIsCapturing(false);setActiveModifiers(new Set());setValidationWarning(null);clearFnHeld();- if (!skipListeningMode)- window.electronAPI?.setHotkeyListeningMode?.(false, lastCapturedHotkeyRef.current);+ window.electronAPI?.setHotkeyListeningMode?.(false, lastCapturedHotkeyRef.current);lastCapturedHotkeyRef.current = null;onBlur?.();- }, [onBlur, clearFnHeld, skipListeningMode]);+ }, [onBlur, clearFnHeld]);useEffect(() => {if (autoFocus && containerRef.current) {@@ -426,10 +423,10 @@ export function HotkeyInput({useEffect(() => {return () => {- if (!skipListeningMode) window.electronAPI?.setHotkeyListeningMode?.(false, null);+ window.electronAPI?.setHotkeyListeningMode?.(false, null);if (warningTimeoutRef.current) clearTimeout(warningTimeoutRef.current);};- }, [skipListeningMode]);+ }, []);useEffect(() => {if (!isCapturing || !isMac) return;diff --git a/src/hooks/useAudioRecording.js b/src/hooks/useAudioRecording.jsindex b02c27046..719217ed9 100644--- a/src/hooks/useAudioRecording.js+++ b/src/hooks/useAudioRecording.js@@ -43,7 +43,7 @@ export const useAudioRecording = (toast, options = {}) => {if (getSettings().pauseMediaOnDictation) {window.electronAPI?.pauseMediaPlayback?.();}- window.electronAPI?.registerCancelHotkey?.(getSettings().cancelKey || "Escape");+ window.electronAPI?.registerCancelHotkey?.("Escape");void playStartCue();}diff --git a/src/hooks/useSettings.ts b/src/hooks/useSettings.tsindex abac8a5ac..7c563be18 100644--- a/src/hooks/useSettings.ts+++ b/src/hooks/useSettings.ts@@ -32,7 +32,6 @@ export interface ReasoningSettings {export interface HotkeySettings {dictationKey: string;- cancelKey: string;meetingKey: string;activationMode: "tap" | "push";}@@ -191,7 +190,6 @@ function useSettingsInternal() {groqApiKey: store.groqApiKey,mistralApiKey: store.mistralApiKey,dictationKey: store.dictationKey,- cancelKey: store.cancelKey,meetingKey: store.meetingKey,theme: store.theme,setUseLocalWhisper: store.setUseLocalWhisper,@@ -223,7 +221,6 @@ function useSettingsInternal() {customReasoningApiKey: store.customReasoningApiKey,setCustomReasoningApiKey: store.setCustomReasoningApiKey,setDictationKey: store.setDictationKey,- setCancelKey: store.setCancelKey,setMeetingKey: store.setMeetingKey,setTheme: store.setTheme,activationMode: store.activationMode,diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex ac7965e5c..2305555eb 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -1172,9 +1172,7 @@"activationMode": "Aktivierungsmodus","description": "Die Tastenkombination, die das Sprachdiktat startet und stoppt","resetToDefault": "Auf {{hotkey}} zurücksetzen",- "title": "Diktat-Hotkey",- "cancelTitle": "Abbrechen-Taste",- "cancelDescription": "Taste zum Abbrechen einer laufenden Aufnahme"+ "title": "Diktat-Hotkey"},"meetingHotkey": {"title": "Meeting-Modus-Hotkey",diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 03095085a..6ef06337e 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -1220,9 +1220,7 @@"activationMode": "Activation Mode","description": "The key combination that starts and stops voice dictation","resetToDefault": "Reset to {{hotkey}}",- "title": "Dictation Hotkey",- "cancelTitle": "Cancel Hotkey",- "cancelDescription": "Key to cancel an in-progress recording"+ "title": "Dictation Hotkey"},"meetingHotkey": {"title": "Meeting Mode Hotkey",diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex 8d3201a48..6133e7e78 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -1172,9 +1172,7 @@"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",- "cancelTitle": "Atajo de cancelación",- "cancelDescription": "Tecla para cancelar una grabación en curso"+ "title": "Atajo de dictado"},"meetingHotkey": {"title": "Atajo modo reunión",diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex 5e82d7c91..cd4866457 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -1172,9 +1172,7 @@"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",- "cancelTitle": "Raccourci d'annulation",- "cancelDescription": "Touche pour annuler un enregistrement en cours"+ "title": "Raccourci de dictée"},"meetingHotkey": {"title": "Raccourci mode réunion",diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex f92ca6b59..5c7418746 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -1172,9 +1172,7 @@"activationMode": "Modalità di attivazione","description": "La combinazione di tasti che avvia e ferma la dettatura vocale","resetToDefault": "Ripristina a {{hotkey}}",- "title": "Scorciatoia di dettatura",- "cancelTitle": "Tasto di annullamento",- "cancelDescription": "Tasto per annullare una registrazione in corso"+ "title": "Scorciatoia di dettatura"},"meetingHotkey": {"title": "Scorciatoia modalità meeting",diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 843794409..e0b39acc0 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -1172,9 +1172,7 @@"activationMode": "起動モード","description": "音声ディクテーションの開始/停止に使用するキーの組み合わせ","resetToDefault": "{{hotkey}}にリセット",- "title": "ディクテーションホットキー",- "cancelTitle": "キャンセルキー",- "cancelDescription": "録音中の記録をキャンセルするキー"+ "title": "ディクテーションホットキー"},"meetingHotkey": {"title": "ミーティングモードホットキー",diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex 2b45f539e..80580683b 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -1144,9 +1144,7 @@"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",- "cancelTitle": "Atalho de cancelamento",- "cancelDescription": "Tecla para cancelar uma gravação em andamento"+ "title": "Atalho de ditado"},"meetingHotkey": {"title": "Atalho modo reunião",diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex 3c2c70205..83918db87 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -1172,9 +1172,7 @@"activationMode": "Режим активации","description": "Комбинация клавиш для запуска и остановки голосовой диктовки","resetToDefault": "Сбросить на {{hotkey}}",- "title": "Горячая клавиша диктовки",- "cancelTitle": "Клавиша отмены",- "cancelDescription": "Клавиша для отмены текущей записи"+ "title": "Горячая клавиша диктовки"},"meetingHotkey": {"title": "Горячая клавиша режима встречи",diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex 571b6cadb..3da7e17cb 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -1172,9 +1172,7 @@"activationMode": "激活模式","description": "用于开始和停止语音听写的组合键","resetToDefault": "重置为 {{hotkey}}",- "title": "听写快捷键",- "cancelTitle": "取消快捷键",- "cancelDescription": "取消进行中录音的按键"+ "title": "听写快捷键"},"meetingHotkey": {"title": "会议模式快捷键",diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex b8b2bdd49..a16e29967 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -1172,9 +1172,7 @@"activationMode": "啟用模式","description": "用來開始和停止語音輸入的組合鍵","resetToDefault": "重置為 {{hotkey}}",- "title": "語音輸入快捷鍵",- "cancelTitle": "取消快捷鍵",- "cancelDescription": "取消進行中錄音的按鍵"+ "title": "語音輸入快捷鍵"},"meetingHotkey": {"title": "會議模式快捷鍵",diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.tsindex 464795268..85321b4cc 100644--- a/src/stores/settingsStore.ts+++ b/src/stores/settingsStore.ts@@ -136,7 +136,6 @@ export interface SettingsStatesetCustomReasoningApiKey: (key: string) => void;setDictationKey: (key: string) => void;- setCancelKey: (key: string) => void;setMeetingKey: (key: string) => void;setActivationMode: (mode: "tap" | "push") => void;@@ -260,7 +259,6 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({customReasoningApiKey: readString("customReasoningApiKey", ""),dictationKey: readString("dictationKey", ""),- cancelKey: readString("cancelKey", "Escape"),meetingKey: readString("meetingKey", ""),activationMode: (readString("activationMode", "tap") === "push" ? "push" : "tap") as| "tap"@@ -425,11 +423,6 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({set({ meetingKey: key });},- setCancelKey: (key: string) => {- if (isBrowser) localStorage.setItem("cancelKey", key);- set({ cancelKey: key });- },-setActivationMode: (mode: "tap" | "push") => {// Linux has no native key listener for push-to-talk — force tapconst effective = isBrowser && window.electronAPI?.getPlatform?.() === "linux" ? "tap" : mode;