Hotkeys are not working in Wayland
What happened
I'm on XDG_SESSION_TYPE=wayland (Hyprland). yap captures global hotkeys via pynput, and pynput's only Linux backend is X11/Xorg (pynput.keyboard._xorg) - there is no Wayland backend. Under Hyprland it connects to XWayland, but Wayland deliberately prevents apps from globally grabbing the keyboard. So pynput's listener sees nothing when you hold a key in a native Wayland window - regardless of which key you bind. Right Ctrl, Right Alt, F9: all equally invisible.
What you expected instead
Keyboard hot-keys work
Tool version
No response
OS / environment
Linux 7.0.9-arch2-1 / Wayland / Hyprland
Error output / logs
Thanks for the precise write-up — your diagnosis is exactly right. pynput's only Linux backend is X11, and Wayland deliberately blocks apps from grabbing global keys, so the listener can't see a thing in native Wayland windows no matter which key is bound. That isn't fixable inside pynput.
Fixed in main (v0.1.6, 415b60b) by letting your compositor own the key instead. yap now runs a small local control socket, and a new yap toggle command drives dictation through it. Bind a key to it in your compositor:
# Hyprland (~/.config/hypr/hyprland.conf)
bind = SUPER, D, exec, yap toggle
- GNOME/KDE: add a custom shortcut that runs
yap toggle. - Hold-to-talk on a press/release bind:
yap ptt press/yap ptt release.
Also: yap now detects a Wayland session at startup and prints these steps instead of silently doing nothing, and yap doctor no longer mis-reports this as a permission problem — it tells you it's Wayland and shows the keybind.
Pull main (or grab the next release) and give it a go on Hyprland. I'll close this as fixed, but please reopen if anything's off — and thanks again for the genuinely useful report.