I just bought a Logitech M535 Bluetooth mouse. It has tilting wheel but it's mapped to "back" and "forward" buttons. To get it work as horizontal scrolling I wrote this script:
#! /bin/dash MOUSE_ID=`xinput list | grep -o 'M535.*pointer' | sed 's/^.*id=\([0-9]*\)[\t].*$/\1/')` xinput set-button-map $MOUSE_ID 1 2 3 4 5 8 9 6 7 10 11 12
Unfortunately, in this way, scolling buttons are not repeating.
Moreover the mouse also has an extra button, which sends ALT+TAB (through a "fake" keyboard):
ignazio@ignazio-HP:~$ xinput | grep M535 ⎜ ↳ Bluetooth Mouse M336/M337/M535 id=15 [slave pointer (2)] ↳ Bluetooth Mouse M336/M337/M535 id=16 [slave keyboard (3)] ignazio@ignazio-HP:~$ xinput test 16 key press 64 key press 23 key release 23 key release 64
How can I bind this button to something other?
I tried to use
xbindkeys but could not make it intercept ALT+TAB. Moreover, even if I could, I want to only intercept from the fake keyboard from the mouse, and I couldn't find any way to filter devices in
I also know there are kernel modules for similar Logitech mouses (see https://github.com/CzBiX/logitech-m560), but this one is not supported.