The reason you would want to use this stupid hacky program is because X-grabs: https://en.wikipedia.org/wiki/X_Window_System_core_protocol#Grabs
absorb key events, including volume up and down events in some programs (KDE ones especially, every right click menu seems to issue one) which is very annoying. And switching to wayland is an even worse solution. Even though I wish it wasn't.
Dependencies: sudo apt install libinput-dev libudev-dev libsystemd-dev build-essential
Compile: gcc vollisten.c -o vollisten $(pkg-config --cflags --libs libinput libudev libsystemd)
Run as root. Yeah... You can learn how to do it passwordless here so you can actually use this as a startup program: https://askubuntu.com/questions/334318/sudoers-file-enable-nopasswd-for-user-all-commands
via Deepseek, not that I mean to advertise any model. I used the online chat.