LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-25-2014, 11:10 AM   #1
Vinter
Member
 
Registered: Feb 2005
Location: Germany
Distribution: Aptosid
Posts: 148

Rep: Reputation: 19
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rebinding usb hid devices to hid-generic driver fails onamatic Linux - Kernel 1 05-25-2014 10:46 AM
In linux platform how to use ioctl function to read/write data to hid device zyroot998 Linux - Software 3 06-28-2011 11:06 PM
Read/write to/from USB HID devices jimspruell Linux - Newbie 0 05-04-2009 11:18 AM
Daemon Processhas already been asked (and possibly answered). alaios Programming 1 09-19-2005 06:24 PM
HID Device wont work c0rderr0y Linux - Hardware 0 02-29-2004 08:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration