Getting Logitech G602 to work - possibly write HID daemon?
Hi!
A while ago, I purchased a Logitech G602 due to its amount of mouse buttons. (If you're looking to buy, most are only practical for large hands or if you hold it in a specific way.) Unfortunately, Logitech seems to have completely scrapped the possibility to just use it as a mouse with 13 buttons - as far as I can see, you're forced to assign keys to every single one except those that you'd find on a $5 model. That allows me to launch programs with them, but not mode windows and the like, which I would like to because I have no window decorations.
So now I'm looking to convert the Super+F1-6 events my mouse emits into mouse button events. I already tried xbindkeys, to no avail - I can't get the +release modifier to work, and according to xbindkeys -mk, it sends strange events. They look like this:
"(Scheme function)"
m:0x40 + c:133
Mod4 + Super_L
"(Scheme function)"
m:0x0 + c:71
F5
Instead of this:
"(Scheme function)"
m:0x40 + c:71
Mod4 + F5
"(Scheme function)"
m:0x40 + c:133
Mod4 + Super_L
Not really sure what that means, but I don't think I could use it with xbindkeys. So I turned to /dev/usb/hiddev1, which reports events from them, in order to figure out if I could write a simple python script that
1. reads button n pressed
2. executes xte 'mousedown n'
3. reads button n released
4. executes xte 'mouseup n'
or something alike. That could actually work - I get a number of bits from the stream when I press the button down, and a number when I release it. However, those bytes don't seem to simply say "pressed" or "released" or even "held for...", not even for the associated keys, because a short click generates a _longer_ signal than a held one. So now I'm at a loss.
Is this way of reading the HID device a sensible approach, and should I pursue it? I'm sure I could figure part of it out by analyzing the patterns and another by reading into HID devices, but I really don't want to go down that road without making sure there's not an extremely easy idea out there that I just overlooked or that this is a dead end.
Thanks in advance!
V
|