JSubelj / g910-gkey-macro-support

GKey support for Logitech G910 Keyboard on Linux
GNU General Public License v3.0
99 stars 31 forks source link

[Issue] Media keys stopped working #87

Closed Captn138 closed 2 months ago

Captn138 commented 10 months ago

Describe the bug The STOP, NEXT and PREVIOUS media keys do not work while using the g910-gkeys driver.

To Reproduce Steps to reproduce the behavior:

  1. systemctl --user start g910-gkeys
  2. I was messing with my keyboard shortcuts in Gnome, so in Settings, Keyboard, View and customize shortcuts
  3. Try to remap a function with the aformentioned keys
  4. Doesn't work
  5. systemctl --user stop g910-gkeys
  6. Test again
  7. Works

Expected behavior The keys should work as they do without the driver.

Additional info

Desktop:

[Service] Type=simple ExecStart=/usr/bin/env g910-gkeys ExecReload=/bin/kill -SIGUSR1 $MAINPID TimeoutStopSec=5 Restart=on-failure RestartSec=10

[Install] WantedBy=default.target

- config file:

{ "__comment" : "following hotkey types are supported: nothing, typeout, shortcut and run; only en, fr, de and si keyboard mappings are currently supported", "keyboard_mapping": "fr", "notify": "False", "username": "captn", "profiles": { "MEMORY_1": { "MACRO_1": { "hotkey_type": "uinput", "do": "KEY_F14" }, "MACRO_2": { "hotkey_type": "uinput", "do": "KEY_F15" }, "MACRO_3": { "hotkey_type": "uinput", "do": "KEY_F16" }, "MACRO_4": { "hotkey_type": "uinput", "do": "KEY_F17" }, "MACRO_5": { "hotkey_type": "uinput", "do": "KEY_F18" }, "MACRO_6": { "hotkey_type": "shortcut", "do": "alt+F1" }, "MACRO_7": { "hotkey_type": "shortcut", "do": "alt+F2" }, "MACRO_8": { "hotkey_type": "shortcut", "do": "alt+F3" }, "MACRO_9": { "hotkey_type": "shortcut", "do": "alt+F12" } }, "MEMORY_2": { "MACRO_1": { "hotkey_type": "uinput", "do": "KEY_M" }, "MACRO_2": { "hotkey_type": "uinput", "do": "KEY_Y" }, "MACRO_3": { "hotkey_type": "uinput", "do": "KEY_F16" }, "MACRO_4": { "hotkey_type": "uinput", "do": "KEY_F17" }, "MACRO_5": { "hotkey_type": "uinput", "do": "KEY_F18" }, "MACRO_6": { "hotkey_type": "shortcut", "do": "alt+F1" }, "MACRO_7": { "hotkey_type": "shortcut", "do": "alt+F2" }, "MACRO_8": { "hotkey_type": "shortcut", "do": "alt+F3" }, "MACRO_9": { "hotkey_type": "shortcut", "do": "alt+F12" } }, "MEMORY_3": { "MACRO_1": { "hotkey_type": "uinput", "do": "KEY_F14" }, "MACRO_2": { "hotkey_type": "uinput", "do": "KEY_F15" }, "MACRO_3": { "hotkey_type": "uinput", "do": "KEY_F16" }, "MACRO_4": { "hotkey_type": "uinput", "do": "KEY_F17" }, "MACRO_5": { "hotkey_type": "uinput", "do": "KEY_F18" }, "MACRO_6": { "hotkey_type": "shortcut", "do": "alt+F1" }, "MACRO_7": { "hotkey_type": "shortcut", "do": "alt+F2" }, "MACRO_8": { "hotkey_type": "shortcut", "do": "alt+F3" }, "MACRO_9": { "hotkey_type": "shortcut", "do": "alt+F12" } } } }

suabo commented 5 months ago

I can verify the Problem and already found the Solution. The Problem is a wrong uinput key code in data_mappers/supported_devices.py.

KEY_PREVIOUS needs to be KEY_PREVIOUSSONG and KEY_NEXT needs to be KEY_NEXTSONG KEY_STOP needs to be KEY_STOPCD

I already tried it with a local rebuild and it works. I'll try to release a new version with the fix in a few days.

Thanks for reporting @Captn138

suabo commented 5 months ago

I released version 0.4.2 with the fix.

Just download the new version and use the uninstall and install script to update and all media keys should work fine.