Repository navigation
Notify when the evdev hotkey can't open any keyboard - #884
Merged
Merged
Conversation
crmne
added a commit
to crmne/voxtype
that referenced
this pull request
Oct 20, 2026
crmne
added a commit
to crmne/voxtype
that referenced
this pull request
Oct 21, 2026
Brings in transcribe.cpp (Cohere GGUF, peteonrails#792) and the 1.2.0 cleanup pipeline, so the Parakeet GGUF branch can sit on top. Conflicts: - notification.rs: kept the D-Bus delivery of peteonrails#881 and added 1.2.0's body_markup probe. - output: the cleanup diff now runs through the titled notification of peteonrails#880, so the clipboard-fallback label keeps the edit count. - evdev: peteonrails#884 opens devices in start(); it now passes the watched keys. - setup: peteonrails#880's pure build_output_chain gains 1.2.0's compositor and /dev/uinput checks. - parakeet.rs: kept peteonrails#891's pause-cut windows, which also cover timed transcription; rc's max_window_secs/window_overlap_secs are unused here. - ci.yml: requires both clippy-features and macos-check.
The listener skipped every device it got EACCES on, then failed inside its own thread with "No keyboard device found". The daemon reported itself running while the hotkey did nothing, and the only trace was a journal line that never mentioned the 'input' group. Open the keyboards in start() instead of in the listener thread, so the daemon gets the error back. When nothing could be opened and at least one device was denied, tell apart a user who is not in the 'input' group, one who is in /etc/group but whose session predates it, and one whose process already has the group. The daemon logs the error and shows a desktop notification with the fix and the compositor keybinding alternative. "Listening for hotkey" is no longer logged when the listener failed.
crmne
added a commit
to crmne/voxtype
that referenced
this pull request
Nov 17, 2026
crmne
force-pushed
the
fix/notify-hotkey-access
branch
from
November 17, 2026 01:09
6839205 to
0e80182
Compare
Contributor
Author
|
Rebased onto |
peteonrails
added a commit
that referenced
this pull request
Nov 17, 2026
Since PR #884 a daemon that cannot open a keyboard posts "Voxtype: hotkey not working" on every start. People who bind `voxtype record toggle` in their compositor and are not in the `input` group, a setup voxtype's own onboarding produces, have a working hotkey and were told otherwise at each login and restart. Retitle it "Voxtype: built-in hotkey unavailable" and have the body say that [hotkey] enabled = false or --no-hotkey turns the built-in hotkey off and silences it. Record the notified cause in a marker under the state directory, the scheme the doctor startup summary uses, so it is shown once per install; a successful start clears the marker so a later breakage is reported again. The warning is still logged on every start.
peteonrails
added a commit
to jaypopat/voxtype
that referenced
this pull request
Nov 22, 2026
Brings in rc/1.3.0 at 142005c: 15 merged PRs (peteonrails#879 to peteonrails#897), most of which add desktop notifications for failures that used to be silent, and the fixes after them. Both sides' behaviour is kept. History still records what was delivered, and the new notices still fire. Conflicts: - src/app/dispatch.rs: kept both sets of new command arms, paste-last and history from this branch and doctor from rc/1.3.0. - src/lib.rs: kept all three new modules (failed_recording, failure_notice, history). - src/hotkey/evdev_listener.rs: rc/1.3.0 opens the keyboards in start() so a missing 'input' group is reported (peteonrails#884). The paste-last keys are added to the watched set there; the loop keeps only its held-modifier state. - src/output/mod.rs: one chain runner instead of two. output_with_fallback_report (peteonrails#880) now returns its report together with this branch's Delivered, and deliver_with_fallback and output_with_fallback are thin wrappers over it. - src/daemon.rs: dictation output calls output_with_fallback_report once. The history note is filled from Delivered (driver, fell_back, the text as delivered) and the clipboard-fallback and nothing-delivered notices from the report. - src/setup/mod.rs: `voxtype setup check` prints the doctor report (peteonrails#887) and then this branch's Dictation History guidance, unchanged. `voxtype doctor` itself is as rc/1.3.0 wrote it. Changed to build, not conflicted: - src/output/fallback.rs: run_chain takes the history delivery context, captures the focused app around each attempt as the old loop did, and returns Delivered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With
[hotkey] enabled = trueand the user not in theinputgroup (or added to it without logging out since), the daemon starts and reports itself running, but the hotkey does nothing. The only trace isHotkey listener error: No keyboard device found in /dev/input/in the journal, which says nothing about theinputgroup even thoughHotkeyError::DeviceAccessalready carries that fix.Root cause
src/hotkey/evdev_listener.rs:270-272:try_open_devicedropsPermissionDeniedwithout recording it.src/hotkey/evdev_listener.rs:189: with no device opened,DeviceManager::newreturnsNoKeyboard, so a permission problem and a machine without a keyboard look the same.src/hotkey/evdev_listener.rs:128-138:DeviceManager::newran inside thespawn_blockingtask, so its error was only logged there.start()had already returnedOk, and the daemon's own "Failed to start hotkey listener" branch (src/daemon.rs:4007) could never fire for it.After startup the listener loop never returns an error (it only exits on stop or channel close), so startup was the only silent failure point.
What changed
DeviceManager::new()now runs instart(), and the manager moves into the listener task. Any failure to open a keyboard comes back to the daemon as an error.src/hotkey/access.rsdecides which error to return:NoKeyboardinputgroup:DeviceAccess(the existing usermod message)InputGroupInactive, which asks the user to log out and back inDeviceDenied, pointing atls -l /dev/input/event*Group lookup uses NSS through
nix::unistd::Group/User(adds nix'suserfeature, no new crate). The classification is a pure function with unit tests.voxtype record togglein the compositor and set[hotkey] enabled = false.notification::send_status(normal urgency, 15 s). It fires once per daemon start, only when the hotkey is enabled. With[hotkey] enabled = falsenothing changes, since no listener is created.docs/TROUBLESHOOTING.mddescribes the notification and its four cases.voxtype statusis unchanged. The state file holds a single word that Waybar and the OSD parse, so it isn't a natural place for this.Notification text
Title for all cases:
Voxtype: hotkey not workingPermission denied reading keyboards in /dev/input. Runsudo usermod -aG input $USER, then log out and back in. Or bindvoxtype record togglein your compositor and set [hotkey] enabled = false.You are in the 'input' group, but this session started before you were added. Log out completely and back in (or reboot). Or bindvoxtype record togglein your compositor and set [hotkey] enabled = false.Permission denied opening /dev/input/event0 although voxtype has the 'input' group. Checkls -l /dev/input/event*. Or bindvoxtype record togglein your compositor and set [hotkey] enabled = false.No keyboard found in /dev/input. Plug one in and restart voxtype. Or bindvoxtype record togglein your compositor and set [hotkey] enabled = false.How it was verified
cargo fmt,cargo test(all pass, 8 new tests inhotkey::access), andcargo clippy --all-targets -- -D warnings -A clippy::double_must_use. The allowed lint is a pre-existingasync_traitwarning from the current toolchain insrc/audio/mod.rsandsrc/output/mod.rs, which this PR doesn't touch.bwrapwith a temporary config,XDG_RUNTIME_DIRand a stubnotify-sendthat records its arguments. A mode-000 file bind-mounted as/dev/input/event0makesopen()fail with EACCES. bwrap's user namespace drops the supplementary groups, which reproduces the re-login case. A fake/etc/groupwithout the user gives the not-a-member case, and one that mapsinputto the overflow gid gives the "has the group, still denied" case. An empty tmpfs/dev/inputgives the no-keyboard case. All four logged the right error and sent exactly the notification above. A run against the real/dev/inputopened the keyboards and sent no notification.