zevv / bucklespring

Nostalgia bucklespring keyboard sound
GNU General Public License v2.0
1.39k stars 82 forks source link

Not working with wayland #129

Open milchmann80 opened 2 months ago

milchmann80 commented 2 months ago

There is no sound in wayland. System is Ubuntu 23.10 with wayland. I tried installing it as an snap package and with apt. Workaround is starting the gnome session with X11.

ldedear commented 1 month ago

I have bucklespring sound in Wayland, but only in the Vivaldi browser. Not in the terminal, text editor, file manager, LibreOffice, or Firefox. I'm listening to it now while typing this comment, but haven't heard it outside of Vivaldi yet.

Fedora 40, KDE Plasma 6.0.4, window manager Kwin, bucklespring installed via Snap

zevv commented 1 month ago

This is a known issue with wayland, as wayland does not offer any mechanisms for globally sniffing keyboard events. The X11 API for capturing keystrokes is operational, but no events are generated for other windows. This of course makes sense, as sniffing keystrokes from another application is a potential security issue.

As an alternative, you can build bucklespring with the libinput backend instead, as this will capture keystrokes directly as they are reported from the kernel to userspace:

make libinput=1

This will require some twiddling with permissions though, as regular users typically do not have access to the devices in /dev/input. On debian/ubuntu-based systems adding your user to the input group should suffice.