Skip to content

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

Description

@UriZafrir

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 (src/app/mod.rs:216).

Toggle mode is broken — handle_toggle() transitions the state enum (Idle → Recording → Transcribing) but never creates a CpalRecorder and never runs the transcription pipeline. This causes the app to get stuck on "Transcribing..." indefinitely.

Reproduce

  1. Run on Linux without root/in input group (global hotkey fails to init)
  2. Press space to start recording → shows "● REC 0.0s"
  3. Press space to stop → stuck on "Transcribing..."

Root Cause

src/app/mod.rs:212-218 — when GlobalHotkey::new() fails:

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;  // <-- broken fallback
    }
}

Fix

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions