zocker-160 / keyboard-center

Application for mapping macro keys on Logitech keyboards
GNU General Public License v3.0
65 stars 2 forks source link

Support for G510 #27

Closed Flying--Dutchman closed 2 years ago

Flying--Dutchman commented 2 years ago

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:

DEBUG: Searching for keyboard...
DEBUG: Keyboard found! :)
DEBUG: requesting USB endpoint...
DEBUG: HIDraw read endpoint found: /dev/hidraw1
DEBUG: HIDraw disable endpoint found: /dev/hidraw1
DEBUG: HIDraw read endpoint found: /dev/hidraw1
DEBUG: HIDraw disable endpoint found: /dev/hidraw1
DEBUG: Checking for HID availability...
DEBUG: Connected to /dev/hidraw1
INFO: starting listener...
/home/flyingdutchman/PycharmProjects/keyboard-center/src/newDeviceDebugger.py:181: DeprecationWarning: There is no current event loop
  evLoop = asyncio.get_event_loop()
DEBUG: Using selector: EpollSelector
DEBUG: Connection using HIDAPI...
DEBUG: Sending sequence to disable G keys
0: b'\x11\x01\x11\x1a\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
1: b'\x11\x01\n*\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2: b'\x11\x01\x0fZ\x01\x03\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
3: b'\x11\x01\x0f\x1a\x00\x02\x00\x00\x00\x00\x00\x084d\x00\x00\x01\x00\x00\x00'
4: b'\x11\x01\x0f\x1a\x01\x04\x00\x00\x00\x00\x00\x004\x01d\x08\x01\x00\x00\x00'
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'\x03\x00\x00 \x00'
got data from keyboard: b'\x03\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'\x03\x00\x00\x80\x00'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x03\x01\x00\x00\x00'
^[OPgot data from keyboard: b'\x01\x00:\x00\x00\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\x00'
got data from keyboard: b'\x03\x02\x00\x00\x00'
^[OQgot data from keyboard: b'\x01\x00;\x00\x00\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\x00'
got data from keyboard: b'\x03\x04\x00\x00\x00'
^[ORgot data from keyboard: b'\x01\x00<\x00\x00\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\x00'
got data from keyboard: b'\x03\x08\x00\x00\x00'
^[OSgot data from keyboard: b'\x01\x00=\x00\x00\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\x00'
got data from keyboard: b'\x03\x10\x00\x00\x00'
^[[15~got data from keyboard: b'\x01\x00>\x00\x00\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\x00'
got data from keyboard: b'\x03 \x00\x00\x00'
^[[17~got data from keyboard: b'\x01\x00?\x00\x00\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\x00'
got data from keyboard: b'\x03@\x00\x00\x00'
^[[18~got data from keyboard: b'\x01\x00@\x00\x00\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\x00'
got data from keyboard: b'\x03\x80\x00\x00\x00'
^[[19~got data from keyboard: b'\x01\x00A\x00\x00\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\x00'
got data from keyboard: b'\x03\x00\x01\x00\x00'
^[[20~got data from keyboard: b'\x01\x00B\x00\x00\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\x00'
got data from keyboard: b'\x03\x00\x02\x00\x00'
^[[21~got data from keyboard: b'\x01\x00C\x00\x00\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\x00'
got data from keyboard: b'\x03\x00\x04\x00\x00'
got data from keyboard: b'\x01\x00D\x00\x00\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\x00'
got data from keyboard: b'\x03\x00\x08\x00\x00'
got data from keyboard: b'\x01\x00E\x00\x00\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\x00'
got data from keyboard: b'\x03\x00\x10\x00\x00'
got data from keyboard: b'\x01\x00\x1e\x00\x00\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\x00'
got data from keyboard: b'\x03\x00 \x00\x00'
got data from keyboard: b'\x01\x00\x1f\x00\x00\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\x00'
got data from keyboard: b'\x03\x00@\x00\x00'
got data from keyboard: b'\x01\x00 \x00\x00\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\x00'
got data from keyboard: b'\x03\x00\x80\x00\x00'
got data from keyboard: b'\x01\x00!\x00\x00\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\x00'
got data from keyboard: b'\x03\x00\x00\x01\x00'
got data from keyboard: b'\x01\x00"\x00\x00\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\x00'
got data from keyboard: b'\x03\x00\x00\x02\x00'
got data from keyboard: b'\x01\x00#\x00\x00\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\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'\x03\x00\x00\x00 '
got data from keyboard: b'\x03\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'\x03\x00\x00\x00\x01'
got data from keyboard: b'\x03\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'\x03\x00\x00\x00\x04'
got data from keyboard: b'\x03\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'\x03\x00\x00\x00\x10'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x03\x00\x00\x08\x00'
got data from keyboard: b'\x04\x04'
got data from keyboard: b'\x03\x00\x00\x00\x00'
got data from keyboard: b'\x02\x08'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02\x04'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02\x02'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02\x01'
got data from keyboard: b'\x02\x00'
got data from keyboard: b'\x02\x10'
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
got data from keyboard: b'\x01\x01\x00\x00\x00\x00\x00\x00'
got data from keyboard: b'\x01\x00\x00\x00\x00\x00\x00\x00'
INFO: stopping...

python3 src/newDeviceDebugger.py --info:

DEBUG: Searching for keyboard...
DEBUG: Keyboard found! :)
DEBUG: requesting USB endpoint...
###
DEVICE ID 046d:c22d on Bus 005 Address 002 =================
 bLength                :   0x12 (18 bytes)
 bDescriptorType        :    0x1 Device
 bcdUSB                 :  0x200 USB 2.0
 bDeviceClass           :    0x0 Specified at interface
 bDeviceSubClass        :    0x0
 bDeviceProtocol        :    0x0
 bMaxPacketSize0        :    0x8 (8 bytes)
 idVendor               : 0x046d
 idProduct              : 0xc22d
 bcdDevice              :  0x165 Device 1.65
 iManufacturer          :    0x1 Error Accessing String
 iProduct               :    0x2 Error Accessing String
 iSerialNumber          :    0x0 
 bNumConfigurations     :    0x1
  CONFIGURATION 1: 500 mA ==================================
   bLength              :    0x9 (9 bytes)
   bDescriptorType      :    0x2 Configuration
   wTotalLength         :   0x42 (66 bytes)
   bNumInterfaces       :    0x2
   bConfigurationValue  :    0x1
   iConfiguration       :    0x0 
   bmAttributes         :   0xa0 Bus Powered, Remote Wakeup
   bMaxPower            :   0xfa (500 mA)
    INTERFACE 0: Human Interface Device ====================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x0
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x1
     bInterfaceClass    :    0x3 Human Interface Device
     bInterfaceSubClass :    0x1
     bInterfaceProtocol :    0x1
     iInterface         :    0x0 
      ENDPOINT 0x81: Interrupt IN ==========================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x81 IN
       bmAttributes     :    0x3 Interrupt
       wMaxPacketSize   :    0x8 (8 bytes)
       bInterval        :    0x4
    INTERFACE 1: Human Interface Device ====================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x1
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x2
     bInterfaceClass    :    0x3 Human Interface Device
     bInterfaceSubClass :    0x0
     bInterfaceProtocol :    0x0
     iInterface         :    0x0 
      ENDPOINT 0x82: Interrupt IN ==========================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x82 IN
       bmAttributes     :    0x3 Interrupt
       wMaxPacketSize   :    0x8 (8 bytes)
       bInterval        :    0x4
      ENDPOINT 0x3: Interrupt OUT ==========================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x3 OUT
       bmAttributes     :    0x3 Interrupt
       wMaxPacketSize   :   0x40 (64 bytes)
       bInterval        :    0x4
###
zocker-160 commented 2 years ago

thank you very much for this output, that looks very useful. I do have a few questions:

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.

Flying--Dutchman commented 2 years ago

I have to thank you for your work on this great tool! :+1:

  1. I do have a windows system with dual boot. I'm currently not using it, but I could install LGS.
  2. Yes, it does. G1 - G12 are mapped with F1 - F12 and G13 - G18 are mapped with the numbers 1 - 6. To this day I still don't know why I thought I would use 18 x 3 macro keys....

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:

zocker-160 commented 2 years ago

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: )

Flying--Dutchman commented 2 years ago

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')

zocker-160 commented 2 years ago

I pushed an update to the script, please try again with that. Also as previously try with disableGKeysInterface set to 1 and 0.

Flying--Dutchman commented 2 years ago

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!

zocker-160 commented 2 years ago

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.

zocker-160 commented 2 years ago

any update @Flying--Dutchman? You are the only one that can help me add support for your keyboard :)

Flying--Dutchman commented 2 years ago

Hey, some stuff came up and I am currently on vacation. Will post the log here next Saturday or Sunday 👍

Flying--Dutchman commented 2 years ago

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
zocker-160 commented 2 years ago

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.

Flying--Dutchman commented 2 years ago

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.

zocker-160 commented 2 years ago

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.

zocker-160 commented 2 years ago

Volume wheel (both directions)

did you scroll up or down first? :smile:

zocker-160 commented 2 years ago

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

Flying--Dutchman commented 2 years ago

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:

zocker-160 commented 2 years ago

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

Flying--Dutchman commented 2 years ago

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:

zocker-160 commented 2 years ago

hmm weird, so we still have the mapping issue ._.

Flying--Dutchman commented 2 years ago

Yes, and I cant figure out why... Will try again with the "NewDeviceDebugger", as soon when I have time

Flying--Dutchman commented 2 years ago

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

zocker-160 commented 2 years ago

@Flying--Dutchman alright I pushed 0.1.31 with useWrite disabled for G510

let me know if it works this time ;)

Flying--Dutchman commented 2 years ago

Works like a charm, thank you very much! :+1:

zocker-160 commented 2 years ago

nice, very good :ok_hand: