Skip to content

fix: Linux/Wayland support with evdev, toggle-in-PTT, debug mode#1

Merged
mathew-cf merged 1 commit intomathew-cf:mainfrom
aberglund-cf:fix/linux
Mar 12, 2026
Merged

fix: Linux/Wayland support with evdev, toggle-in-PTT, debug mode#1
mathew-cf merged 1 commit intomathew-cf:mainfrom
aberglund-cf:fix/linux

Conversation

@aberglund-cf
Copy link
Copy Markdown
Contributor

  • Replace rdev (X11-only) with evdev for global hotkey on Linux

    • hotkey_linux.rs: reads /dev/input/event* directly, works on Wayland
    • hotkey_macos.rs: rdev-based backend (unchanged behavior on macOS)
    • Detailed error diagnostics for missing input group permissions
  • Fix PTT on Linux: suppress KeyUp+Toggle double-fire from evdev

    • suppress_next_toggle flag prevents re-starting recording on key release
    • Terminal keyboard (space) now works as toggle even in PTT mode
  • Fix welcome banner shifting (raw mode \n vs \r\n race)

    • Print banner before spawning keyboard thread
  • Add 10Hz UI tick timer for recording duration and transcribing spinner

  • Add --debug mode: no animated display, plain log lines to stderr

    • Logs key events, device name, audio levels, duration, transcript
    • Skips OpenCode injection and connectivity check
    • --port not required in debug mode
    • Uses \r\n for correct output in raw mode
  • Suppress JACK/ALSA startup noise via env vars (JACK_NO_START_SERVER etc)

  • Update welcome banner to show both hotkey and terminal toggle inputs

- Replace rdev (X11-only) with evdev for global hotkey on Linux
  - hotkey_linux.rs: reads /dev/input/event* directly, works on Wayland
  - hotkey_macos.rs: rdev-based backend (unchanged behavior on macOS)
  - Detailed error diagnostics for missing input group permissions

- Fix PTT on Linux: suppress KeyUp+Toggle double-fire from evdev
  - suppress_next_toggle flag prevents re-starting recording on key release
  - Terminal keyboard (space) now works as toggle even in PTT mode

- Fix welcome banner shifting (raw mode \n vs \r\n race)
  - Print banner before spawning keyboard thread

- Add 10Hz UI tick timer for recording duration and transcribing spinner

- Add --debug mode: no animated display, plain log lines to stderr
  - Logs key events, device name, audio levels, duration, transcript
  - Skips OpenCode injection and connectivity check
  - --port not required in debug mode
  - Uses \r\n for correct output in raw mode

- Suppress JACK/ALSA startup noise via env vars (JACK_NO_START_SERVER etc)

- Update welcome banner to show both hotkey and terminal toggle inputs
@mathew-cf mathew-cf merged commit 08160c4 into mathew-cf:main Mar 12, 2026
4 checks passed
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.

2 participants