Hello.
I'm a lazy bastard with a Logitech MX1000 mouse. It has 10 buttons, so I can do lots of things with them. But that's not enough. I want to use one of the buttons as a 'modifier' in combinations with other mouse buttons to trigger (hopefully up to 18) different actions.
MX1000 has a "Window List" button (technically called b:10) that is perfect for this. I can map it to a specific action with xbindkeys as following:
Code:
# Some Action:
"/usr/bin/some_action"
m:0x10 + b:10
But what I really want do is bind it to a
combination of two (or possibly more?) mouse keys.
I have tried doing it this way:
Code:
# Some Action:
"/usr/bin/some_action"
m:0x10 + b:10 + b:13
(button 13 is when you push the scroll wheel to the left - the same as b:6+Release)
But this does not work. It gets triggered when I press b:13, but not in combination with b:10. (If I swap b:10 and b:13, it only works when I press b:10)
I've found a hacky workaroundish way to do it, but it is not that great. What I did was bind button10 to "echo 1 > ~/.mymodkey" and button10/release to "echo 0 > ~/.mymodkey" and then I check this value on other keys. Here is the xbindkeysrc:
Code:
# Toggle mouse modifier:
"echo 1 > ~/.mymodkey"
m:0x10 + b:10
# Untoggle mouse modifier:
"echo 0 > ~/.mymodkey"
m:0x10 + b:10 + Release
# Next Song
"if [ "`cat ~/.mymodkey`" -eq "1" ]; then rhythmbox-client --next ; fi"
m:0x10 + b:14
# Previous Song:
"if [ "`cat ~/.mymodkey`" -eq "1" ]; then rhythmbox-client --previous ; fi"
m:0x10 + b:13
But this isn't exactly a good solution, because I can't make useful combinations like b:10 and b:1 ... xbindkeys grabs the defined keys so they no longer do what they originally did. And I still need to be able to leftclick.
So, how do I do this?
Can I add a new (mouse!) modifier key with xmodmap? I saw my mod3 is still unused. Is it possible to map it to a mouse key at all?
Is it possible to bind something (with xbindkeys or w/ something else) parallel to its original function?
Any other solution?