Skip to content

fix: keep push-to-talk enabled when global hotkey fails#3

Open
UriZafrir wants to merge 1 commit into
mathew-cf:mainfrom
UriZafrir:main
Open

fix: keep push-to-talk enabled when global hotkey fails#3
UriZafrir wants to merge 1 commit into
mathew-cf:mainfrom
UriZafrir:main

Conversation

@UriZafrir

Copy link
Copy Markdown

Problem

When the global hotkey fails to initialize on Linux (e.g., missing evdev permissions), the app silently falls back to toggle mode by setting push_to_talk = false. Toggle mode is broken — it transitions states without creating a recorder or running transcription, causing the app to get stuck on "Transcribing...".

Fixes #2

Change

Keep push_to_talk = true when the global hotkey fails. The terminal keyboard (space) continues to work through the PTT path. Just warn the user the global hotkey is unavailable.

 Err(e) => {
     eprintln!("[voice] Warning: Could not set up global hotkey: {}", e);
-    if self.config.push_to_talk {
-        eprintln!("[voice] Falling back to toggle mode (press space to start/stop recording).");
-        self.config.push_to_talk = false;
-    }
+    eprintln!("[voice] Global hotkey unavailable. Use terminal keyboard (space) to record.");
 }

When the global hotkey fails to initialize, the app was falling back
to toggle mode (push_to_talk = false). Toggle mode is broken — it
transitions states without creating a recorder or running transcription,
causing the app to get stuck on 'Transcribing...'.

Now the app keeps push_to_talk = true and just warns the user that the
global hotkey is unavailable. Space key continues to work via terminal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global hotkey fallback to toggle mode causes stuck 'Transcribing...' state

1 participant