-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Trying to figure out if it's currently possible and I'm missing something or if this wouldn't work with how push2talk monitors for keyboard events.
Ideally, the end goal is to use a side button on a wireless mouse being held as the trigger to unmute the microphone, with releasing the mouse button resulting in muting the microphone.
Trying to set either extra, BTN_EXTRA (from evtest), or 276 in PUSH2TALK_KEYBIND results in:
[2025-12-20T07:43:25Z ERROR push2talk] Error in thread 'libinput': "Unable to parse keybind"
I took a peek inside
Line 147 in 1a87e17
| fn parse_keybind() -> Result<Vec<Keysym>, Box<dyn Error>> { |
Specifically, I think mouse button presses are exposed as pointer events rather than keyboard events and mouse buttons may not have xkb keysyms associated with them.
For reference, this is what wev shows for a mouse button event:
[13: wl_pointer] button: serial: 51163; time: 17158058; button: 276 (extra), state: 0 (released)
[13: wl_pointer] frame
[13: wl_pointer] button: serial: 51164; time: 17158337; button: 276 (extra), state: 1 (pressed)
[13: wl_pointer] frame
[13: wl_pointer] button: serial: 51165; time: 17158463; button: 276 (extra), state: 0 (released)
[13: wl_pointer] frame
Compared to a keyboard event with a keysym shown for the name:
[14: wl_keyboard] key: serial: 51166; time: 17158673; key: 64; state: 1 (pressed)
sym: Alt_L (65513), utf8: ''
I'm not familiar with wayland or x11 underpinnings so I very well could be missing something obvious, sorry about that.
Happy to provide any information I can to help.