Closed Flying--Dutchman closed 2 years ago
thank you very much for this output, that looks very useful. I do have a few questions:
evtest
for example)I am asking, because in your output it seems like that there is a default mapping going on (which all modern Logitech keyboards do), but that means that the GKeyMapping disable function did not work - so we will have to do a fair bit of additional testing.
I have to thank you for your work on this great tool! :+1:
The G510 is rather old (ca. 2010), and I would guess that there aren't a lot of people using it, especially not with Linux. So, don't put too much effort into it :wink:
understood
So, don't put too much effort into it
well it is more up to you if you are willing to test stuff for me, since you are the only one that can do that :)
the first thing you could try is go into the src/newDeviceDebugger.py
file and try to use the disableGKeys
variable from the G710+ and G910 and see if you manage to disable the default mapping this way.
If you are unfamiliar with Python, you can just commend and uncomment a line with #
, so you need to comment lines 41 - 47 and uncomment 32 and then run it.
If we can find out the command to disable the mapping, then it should "just work"
EDIT: if none of that works, you could also try to change the usbUseWrite
in line 17, setting it to False
or set disableGKeysInterface
in line 16 to 0 (and try a few combinations of those, it is essentially a small guessing game :laughing: )
Unfortunately that didn't work.
Also, with usbUseWrite
set to False, I get an exception.
keyboard-center/src/newDeviceDebugger.py:109> exception=HIDException('ioctl (SFEATURE): Broken pipe')
I pushed an update to the script, please try again with that. Also as previously try with disableGKeysInterface
set to 1 and 0.
With disableGKeysInterface = 0
I get an exception:
With usbUseWrite = True
: keyboard-center/src/newDeviceDebugger.py:122> exception=HIDException('Broken pipe')
With usbUseWrite = False
: keyboard-center/src/newDeviceDebugger.py:122> exception=HIDException('ioctl (SFEATURE): Broken pipe')
With disableGKeysInterface = 1
The programm hangs after:
DEBUG: Sending sequence to disable G keys
0: b'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
EDIT: It doesn't hang, but simply takes ages to proceed. I forgot that it was running and it just finished with sending all 3 sequence lines.
But the good news is, the mapping appears to be gone!
ooh awesome!
alright I pushed another update to the script, could you do the button pressing again (like shown in the readme)?
It would be helpful to add some empty lines after each button press (you can just hit enter), so I can see what the keyboard is sending with each press.
any update @Flying--Dutchman? You are the only one that can help me add support for your keyboard :)
Hey, some stuff came up and I am currently on vacation. Will post the log here next Saturday or Sunday 👍
Keys pressed: M1, M2, M3, MR G1 - G18 Game slider (on and off) Headphone sound off Microphone mute LCD - App switch LCD - Buttons 1-4 Keyboard light on/off Play/Pause Stop Previous Next Sound off Volume wheel (both directions)
DEBUG: listening to USB Interface (1, 0) | b'/dev/hidraw1'
got data from keyboard: b'\x03\x00\x00\x10\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00 \x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00@\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x80\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x01\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x02\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x04\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x08\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x10\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03 \x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03@\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x80\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x01\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x02\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x04\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x08\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x10\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00 \x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00@\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x80\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x01\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x02\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x04\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00 '
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00@'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x01'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x02'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x04'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x08'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x00\x10'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x08\x00'
got data from keyboard: b'\x04\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x02\x08'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x02\x04'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x02\x02'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x02\x01'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x02\x10'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x01\x00(\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x02 '
got data from keyboard: b'\x02@'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02 '
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02 '
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02 '
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02 '
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02@'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02@'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02@'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02@'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02@'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02@'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x01\x01\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x01\x06\x00\x00\x00\x00\x00'
^CHIDerrpr: Interrupted system call
thank you very much for this, that is very helpful
I wonder, do the media buttons (start stop etc) do anything when you press them? Do they work at all in Linux? If not I could add support for those as well and make them work.
I'm the one who should be thankful, not you. :smile:
The media buttons are working on my system, without any problem. The headphone and microphone buttons also work, but only when the device is connected with the keyboard unfortunately. (Same as on windows) Game switch and keyboard light also work without any problem, the logic for those are probably directly on the keyboard.
The media buttons are working on my system, without any problem. Game switch and keyboard light also work without any problem, the logic for those are probably directly on the keyboard.
ok nice sounds good, I will then just ignore those inputs.
Volume wheel (both directions)
did you scroll up or down first? :smile:
alright I have a first version for testing, what system are you using @Flying--Dutchman? Can I give you a DEB?
EDIT: and please let me know how if the UI handles 18 macro keys, I have not tested it with so many buttons xD
did you scroll up or down first? smile Good question.... I think I scrolled down first ^^ But that control also already works.
alright I have a first version for testing, what system are you using @Flying--Dutchman? Can I give you a DEB? I'm running Manjaro, but you can give me a deb file
EDIT: and please let me know how the UI handles 18 macro keys, I have not tested it with so many buttons xD Will do :smile:
alright there you go @Flying--Dutchman keyboard-center-git.zip
lmk if it works for you, so I can release it as a new version, you then can use the version in AUR
I tested the G3-example, which works -> nice But some of the F-keys are still mapped. When pressing G11, it triggers the F11-Key for example. I will check if I can narrow it down to a line of code.
EDIT: and please let me know how if the UI handles 18 macro keys, I have not tested it with so many buttons xD
The ui has no problem with the 18 keys and works great! :+1:
hmm weird, so we still have the mapping issue ._.
Yes, and I cant figure out why... Will try again with the "NewDeviceDebugger", as soon when I have time
Ok, so I tried it with the sources from 19. April and the current main branch.
The only thing I needed to do in newDeviceDebugger
was to change the following line:
usbUseWrite = True
to usbUseWrite = False
@Flying--Dutchman alright I pushed 0.1.31 with useWrite disabled for G510
let me know if it works this time ;)
Works like a charm, thank you very much! :+1:
nice, very good :ok_hand:
Hello, I followed your steps in the README to include the (old) G510 Keyboard. I pressed all the memory (M-keys), makro (G-keys) and every other non-standard key I could find. The last key was the volume wheel. Output:
USB ID: 046d:c22d
python3 src/newDeviceDebugger.py:
python3 src/newDeviceDebugger.py --info: