KarsMulder / evsieve

A utility for mapping events from Linux event devices.
GNU General Public License v2.0
199 stars 11 forks source link

How to filter Volume Up and Volume Down? #11

Closed oitos closed 2 years ago

oitos commented 2 years ago

I've tried evtest and evsieve with the --print argument to figure out what the key names are; I see KEY_VOLUMEUP and KEY_VOLUMEDOWN as the name, but if I try key:volumeup,volup,volume_up,volup - none of them work (same for down).
Is there a way to filter out these keys from a virtual keyboard? Mute, play/pause and such seem to work just fine.

Thanks. Any thoughts are welcome, and appreciate your time and effort.

Edit: I have a Logitech G810 Keyboard in case that matters. [Don't buy, the [[physical]] key caps are crap.] All regular keyboard events are detected on /dev/input/by-id/usb-Logitech_Gaming_Keyboard_G810_036B364F3537-event-kbd,
while media keys (and I think only media keys) are detected on /dev/input/by-id/usb-Logitech_Gaming_Keyboard_G810_036B364F3537-if01-event-kbd

KarsMulder commented 2 years ago

Their names should just be key:volumeup and key:volumedown. For example, the following script should filter out those events:

evsieve --input /dev/input/by-id/usb-Logitech_Gaming_Keyboard_G810_036B364F3537-if01-event-kbd grab \
        --block key:volumeup key:volumedown \
        --output

If the above does not work, could you please post the script/evtest command that shows the KEY_VOLUMEUP events showing up and the script with which you're trying to filter them?

oitos commented 2 years ago

Yep that works just fine!
I must have messed up the syntax when I was mucking about with it yesterday and made the wrong assumptions.
It was pretty trivial in the end.

Thanks for taking your time to respond.