Configure mouse button as a combination of keyboard keys
[Apologies if this is not the most appropriate venue for this question. Suggestions as to where to post this welcome.]
I know how to map one mouse button onto one keyboard key, but how do you map one mouse button onto a combination of keyboard keys? What is the HWDB syntax? This below doesn't work: the latest 9000x assignment is the one that overrides all the previous 9000x assignments. I am thus hoping that there's a way to somehow list a combination of keyboard keys onto one 9000x line. Is that even possible?
What I am trying to achieve is to map the 90004 mouse button onto key_leftmeta + key_pagedown
and the 90005 button onto key_leftmeta + key_pageup
. The code below actually maps 90004 onto key_pagedown
and 90005 onto key_pageup
.
# 70-mouse-remap.hwdb
# Remap buttons on Logitech M585/M590 mouse:
evdev:name:Logitech M585/M590:*
KEYBOARD_KEY_90004=key_leftmeta
KEYBOARD_KEY_90004=key_pagedown
KEYBOARD_KEY_90005=key_leftmeta
KEYBOARD_KEY_90005=key_pageup
Clear Linux 38620, Wayland, kernel 6.2.7