sezanzeb / input-remapper

🎮 ⌨ An easy to use tool to change the behaviour of your input devices.
GNU General Public License v3.0
3.84k stars 160 forks source link

deb file install / Steam controller issue #6

Closed danrobi11 closed 3 years ago

danrobi11 commented 3 years ago

Im running MXLinux with sysv init and I cant install the deb file. Its crying for systemd.

sezanzeb commented 3 years ago

Thanks for testing it on your distro. Please always post error messages, but most likely it fails in postinst. I have pushed a potential fix and it can be tested by building the .deb file from the latest git source (see readme)

If it installs, the following commands can be used to make sure it works:

sudo key-mapper-service &
key-mapper-control --command hello

should print Daemon answered with "hello". and

sudo key-mapper-control --list-devices

should print Found "...", .... If anything looks wrong, feel free to post another comment here.

danrobi11 commented 3 years ago

Thank you much for the support in the middle of the Holidays, its very appreciated.

I followed the guide and its now working with sudo key-mapper-gtk

My Razer DeathAdder Elite(mouse) and my Logitech K400 Plus(keyboard) are working as intended. However, my SCController Mouse(Steam controller) doesnt work. Saving/apply new mapping button doesnt work. The button/joystick keybind does not change.

I've tried the sudo key-mapper-service command and now its running in the background. I cant kill it. I've tried to kill the PID with sudo and it does not work, what the heck?

Also, please consider adding a close/exit button or ctrl+q to quit for WM users.

Heres the output:

$ sudo key-mapper-gtk
Loaded config from "/home/danrobi/.config/key-mapper/config.json"
Writing "/home/danrobi/.config/key-mapper/xmodmap.json"
key-mapper 0.4.0
Found "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
Loading preset from "/home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json"
Found "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
Updating configs for "SCController Mouse", "new preset"
Saving preset to /home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json
Found "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
Loaded config from "/home/danrobi/.config/key-mapper/config.json"
Loading preset from "/home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json"
Starting injecting the mapping for "SCController Mouse"
Found "key-mapper SCController Mouse", "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
This device is currently mapped.
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/keymapper/dev/injector.py", line 369, in _start_injecting
    loop.run_until_complete(asyncio.gather(*coroutines))
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.7/dist-packages/keymapper/dev/ev_abs_mapper.py", line 118, in ev_abs_mapper
    max_value = input_device.absinfo(EV_ABS).max
AttributeError: 'InputDevice' object has no attribute 'absinfo'
sezanzeb commented 3 years ago

Can you please post some log output with sudo key-mapper-gtk -d for the saving problem?

danrobi11 commented 3 years ago

ctrl+q should now work

Nice, Thanks! Yep, sudo pkill -f key-mapper-service did kill it.

Good news, now it does apply the change on the Steam controller :+1:

Still got issue with the Steam controller :

$ sudo key-mapper-gtk -d
Loaded config from "/home/danrobi/.config/key-mapper/config.json"
Writing "/home/danrobi/.config/key-mapper/xmodmap.json"
INFO: logger.py, line 114, key-mapper 0.4.0
INFO: logger.py, line 117, python-evdev 1.1.2
WARNING: logger.py, line 124, Debug level will log all your keystrokes! Do not post this output in the internet if you typed in sensitive or private information with your device!
DEBUG: logger.py, line 129, pid 29910
WARNING: daemon.py, line 73, The daemon "key-mapper-service" is not running, mapping keys only works as long as the window is open.
DEBUG: daemon.py, line 131, Creating daemon
DEBUG: data.py, line 86, Found data at "/usr/share/key-mapper"
DEBUG: getdevices.py, line 93, Discovering device paths
SPAM: getdevices.py, line 116, Found "Microsoft X-Box 360 pad", /dev/input/event22, 
SPAM: getdevices.py, line 116, Found "SCController Mouse", /dev/input/event21, 
SPAM: getdevices.py, line 116, Found "SCController Keyboard", /dev/input/event20, 
SPAM: getdevices.py, line 116, Found "ACPI Virtual Keyboard Device", /dev/input/event19, 
SPAM: getdevices.py, line 116, Found "Logitech K400 Plus", /dev/input/event9, usb-0000:00:14.0-1.3:1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event8, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event7, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite System Control", /dev/input/event6, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Consumer Control", /dev/input/event5, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Keyboard", /dev/input/event4, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event3, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Video Bus", /dev/input/event2, LNXVIDEO
INFO: getdevices.py, line 179, Found "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
DEBUG: presets.py, line 144, The newest preset is "SCController Mouse", "swswswnnnvvnnvvw"
DEBUG: window.py, line 453, Selecting device "SCController Mouse"
DEBUG: window.py, line 265, "SCController Mouse" presets: "swswswnnnvvnnvvw"
DEBUG: window.py, line 501, Selecting preset "swswswnnnvvnnvvw"
INFO: mapping.py, line 139, Loading preset from "/home/danrobi/.config/key-mapper/presets/SCController Mouse/swswswnnnvvnnvvw.json"
SPAM: mapping.py, line 175, (1, 57, 1) maps to v
SPAM: mapping.py, line 175, (1, 28, 1) maps to n
SPAM: mapping.py, line 175, (1, 103, 1) maps to w
SPAM: mapping.py, line 175, (1, 108, 1) maps to s
SPAM: mapping.py, line 175, (1, 36, 1) maps to j
SPAM: mapping.py, line 175, (1, 1, 1) maps to k
SPAM: mapping.py, line 175, (1, 56, 1) maps to r
DEBUG: config.py, line 130, Changing "gamepad.joystick.left_purpose" to "wheel" in Mapping
DEBUG: config.py, line 130, Changing "gamepad.joystick.right_purpose" to "wheel" in Mapping
DEBUG: config.py, line 130, Changing "gamepad.joystick.pointer_speed" to "20.97537938439623" in Mapping
DEBUG: getdevices.py, line 93, Discovering device paths
SPAM: getdevices.py, line 116, Found "Microsoft X-Box 360 pad", /dev/input/event22, 
SPAM: getdevices.py, line 116, Found "SCController Mouse", /dev/input/event21, 
SPAM: getdevices.py, line 116, Found "SCController Keyboard", /dev/input/event20, 
SPAM: getdevices.py, line 116, Found "ACPI Virtual Keyboard Device", /dev/input/event19, 
SPAM: getdevices.py, line 116, Found "Logitech K400 Plus", /dev/input/event9, usb-0000:00:14.0-1.3:1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event8, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event7, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite System Control", /dev/input/event6, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Consumer Control", /dev/input/event5, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Keyboard", /dev/input/event4, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event3, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Video Bus", /dev/input/event2, LNXVIDEO
INFO: getdevices.py, line 179, Found "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
DEBUG: reader.py, line 119, Starting reading keycodes from "Microsoft X-Box 360 pad", "SCController Mouse", "SCController Keyboard", "ACPI Virtual Keyboard Device"
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 36, 1)
INFO: row.py, line 125, "J" already mapped to j"
SPAM: pid 29919, reader.py, line 139, got (1, 36, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 36, 1)
INFO: row.py, line 125, "J" already mapped to j"
SPAM: pid 29919, reader.py, line 139, got (1, 36, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
INFO: presets.py, line 156, Removing "/home/danrobi/.config/key-mapper/presets/SCController Mouse/swswswnnnvvnnvvw.json"
DEBUG: presets.py, line 161, Removing empty dir "/home/danrobi/.config/key-mapper/presets/SCController Mouse"
INFO: paths.py, line 78, Creating dir "/home/danrobi/.config/key-mapper/presets/SCController Mouse"
INFO: mapping.py, line 195, Saving preset to /home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json
INFO: paths.py, line 64, Creating file "/home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json"
DEBUG: window.py, line 501, Selecting preset "new preset"
INFO: mapping.py, line 139, Loading preset from "/home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json"
SPAM: pid 29919, reader.py, line 139, got (1, 36, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 36, 0)
DEBUG: mapping.py, line 91, (1, 36, 1) will map to v, replacing None
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 56, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 56, 0)
DEBUG: mapping.py, line 91, (1, 56, 1) will map to b, replacing None
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 1)
SPAM: pid 29919, reader.py, line 139, got (1, 272, 0)
INFO: window.py, line 572, Updating configs for "SCController Mouse", "new preset"
INFO: mapping.py, line 195, Saving preset to /home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json
DEBUG: window.py, line 265, "SCController Mouse" presets: "new preset"
DEBUG: window.py, line 408, Applying preset "new preset" for "SCController Mouse"
INFO: config.py, line 228, Loaded config from "/home/danrobi/.config/key-mapper/config.json"
INFO: mapping.py, line 139, Loading preset from "/home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json"
SPAM: mapping.py, line 175, (1, 36, 1) maps to v
SPAM: mapping.py, line 175, (1, 56, 1) maps to b
DEBUG: daemon.py, line 189, Using keycodes from "/home/danrobi/.config/key-mapper/xmodmap.json"
DEBUG: reader.py, line 79, Sending close msg to reader
DEBUG: pid 29919, reader.py, line 158, Reader stopped
INFO: pid 29938, injector.py, line 300, Starting injecting the mapping for "SCController Mouse"
DEBUG: pid 29938, injector.py, line 200, Grab /dev/input/event22
DEBUG: pid 29938, injector.py, line 311, Parsing macros for /dev/input/event22
DEBUG: getdevices.py, line 93, Discovering device paths
SPAM: getdevices.py, line 116, Found "key-mapper SCController Mouse", /dev/input/event23, key-mapper
SPAM: getdevices.py, line 116, Found "Microsoft X-Box 360 pad", /dev/input/event22, 
SPAM: getdevices.py, line 116, Found "SCController Mouse", /dev/input/event21, 
SPAM: getdevices.py, line 116, Found "SCController Keyboard", /dev/input/event20, 
SPAM: getdevices.py, line 116, Found "ACPI Virtual Keyboard Device", /dev/input/event19, 
SPAM: getdevices.py, line 116, Found "Logitech K400 Plus", /dev/input/event9, usb-0000:00:14.0-1.3:1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event8, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event7, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite System Control", /dev/input/event6, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Consumer Control", /dev/input/event5, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Keyboard", /dev/input/event4, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event3, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Video Bus", /dev/input/event2, LNXVIDEO
INFO: getdevices.py, line 179, Found "key-mapper SCController Mouse", "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
DEBUG: reader.py, line 119, Starting reading keycodes from "Microsoft X-Box 360 pad", "SCController Mouse", "SCController Keyboard", "ACPI Virtual Keyboard Device"
SPAM: pid 29938, injector.py, line 332, Injected capabilities for "/dev/input/event22": {('EV_SYN', 0): [('SYN_REPORT', 0), ('SYN_CONFIG', 1), ('SYN_MT_REPORT', 2), ('?', 21)], ('EV_KEY', 1): [('KEY_V', 47), ('KEY_B', 48), (['BTN_A', 'BTN_GAMEPAD', 'BTN_SOUTH'], 304), (['BTN_B', 'BTN_EAST'], 305), (['BTN_NORTH', 'BTN_X'], 307), (['BTN_WEST', 'BTN_Y'], 308), ('BTN_TL', 310), ('BTN_TR', 311), ('BTN_SELECT', 314), ('BTN_START', 315), ('BTN_MODE', 316), ('BTN_THUMBL', 317), ('BTN_THUMBR', 318)], ('EV_REL', 2): [('REL_X', 0), ('REL_Y', 1), ('REL_WHEEL', 8)]}
DEBUG: pid 29938, injector.py, line 189, No need to grab /dev/input/event21
INFO: window.py, line 466, This device is currently mapped.
DEBUG: pid 29938, injector.py, line 200, Grab /dev/input/event20
DEBUG: pid 29938, injector.py, line 311, Parsing macros for /dev/input/event20
SPAM: pid 29938, injector.py, line 332, Injected capabilities for "/dev/input/event20": {('EV_SYN', 0): [('SYN_REPORT', 0), ('SYN_CONFIG', 1), ('?', 4), ('?', 21)], ('EV_KEY', 1): [('KEY_ESC', 1), ('KEY_1', 2), ('KEY_2', 3), ('KEY_3', 4), ('KEY_4', 5), ('KEY_5', 6), ('KEY_6', 7), ('KEY_7', 8), ('KEY_8', 9), ('KEY_9', 10), ('KEY_0', 11), ('KEY_MINUS', 12), ('KEY_EQUAL', 13), ('KEY_BACKSPACE', 14), ('KEY_TAB', 15), ('KEY_Q', 16), ('KEY_W', 17), ('KEY_E', 18), ('KEY_R', 19), ('KEY_T', 20), ('KEY_Y', 21), ('KEY_U', 22), ('KEY_I', 23), ('KEY_O', 24), ('KEY_P', 25), ('KEY_LEFTBRACE', 26), ('KEY_RIGHTBRACE', 27), ('KEY_ENTER', 28), ('KEY_LEFTCTRL', 29), ('KEY_A', 30), ('KEY_S', 31), ('KEY_D', 32), ('KEY_F', 33), ('KEY_G', 34), ('KEY_H', 35), ('KEY_J', 36), ('KEY_K', 37), ('KEY_L', 38), ('KEY_SEMICOLON', 39), ('KEY_APOSTROPHE', 40), ('KEY_GRAVE', 41), ('KEY_LEFTSHIFT', 42), ('KEY_BACKSLASH', 43), ('KEY_Z', 44), ('KEY_X', 45), ('KEY_C', 46), ('KEY_V', 47), ('KEY_B', 48), ('KEY_N', 49), ('KEY_M', 50), ('KEY_COMMA', 51), ('KEY_DOT', 52), ('KEY_SLASH', 53), ('KEY_RIGHTSHIFT', 54), ('KEY_KPASTERISK', 55), ('KEY_LEFTALT', 56), ('KEY_SPACE', 57), ('KEY_CAPSLOCK', 58), ('KEY_F1', 59), ('KEY_F2', 60), ('KEY_F3', 61), ('KEY_F4', 62), ('KEY_F5', 63), ('KEY_F6', 64), ('KEY_F7', 65), ('KEY_F8', 66), ('KEY_F9', 67), ('KEY_F10', 68), ('KEY_NUMLOCK', 69), ('KEY_SCROLLLOCK', 70), ('KEY_KP7', 71), ('KEY_KP8', 72), ('KEY_KP9', 73), ('KEY_KPMINUS', 74), ('KEY_KP4', 75), ('KEY_KP5', 76), ('KEY_KP6', 77), ('KEY_KPPLUS', 78), ('KEY_KP1', 79), ('KEY_KP2', 80), ('KEY_KP3', 81), ('KEY_KP0', 82), ('KEY_KPDOT', 83), ('KEY_102ND', 86), ('KEY_F11', 87), ('KEY_F12', 88), ('KEY_KPENTER', 96), ('KEY_RIGHTCTRL', 97), ('KEY_KPSLASH', 98), ('KEY_SYSRQ', 99), ('KEY_RIGHTALT', 100), ('KEY_HOME', 102), ('KEY_UP', 103), ('KEY_PAGEUP', 104), ('KEY_LEFT', 105), ('KEY_RIGHT', 106), ('KEY_END', 107), ('KEY_DOWN', 108), ('KEY_PAGEDOWN', 109), ('KEY_INSERT', 110), ('KEY_DELETE', 111), (['KEY_MIN_INTERESTING', 'KEY_MUTE'], 113), ('KEY_VOLUMEDOWN', 114), ('KEY_VOLUMEUP', 115), ('KEY_PAUSE', 119), ('KEY_LEFTMETA', 125), ('KEY_RIGHTMETA', 126), ('KEY_COMPOSE', 127), ('KEY_BACK', 158), ('KEY_FORWARD', 159), ('KEY_NEXTSONG', 163), ('KEY_PLAYPAUSE', 164), ('KEY_PREVIOUSSONG', 165), ('KEY_CONFIG', 171), ('KEY_HOMEPAGE', 172)], ('EV_MSC', 4): [('MSC_SCAN', 4)]}
DEBUG: pid 29938, injector.py, line 200, Grab /dev/input/event19
DEBUG: pid 29938, injector.py, line 311, Parsing macros for /dev/input/event19
SPAM: pid 29938, injector.py, line 332, Injected capabilities for "/dev/input/event19": {('EV_SYN', 0): [('SYN_REPORT', 0), ('SYN_CONFIG', 1), ('?', 21)], ('EV_KEY', 1): [('KEY_ESC', 1), ('KEY_1', 2), ('KEY_2', 3), ('KEY_3', 4), ('KEY_4', 5), ('KEY_5', 6), ('KEY_6', 7), ('KEY_7', 8), ('KEY_8', 9), ('KEY_9', 10), ('KEY_0', 11), ('KEY_MINUS', 12), ('KEY_EQUAL', 13), ('KEY_BACKSPACE', 14), ('KEY_TAB', 15), ('KEY_Q', 16), ('KEY_W', 17), ('KEY_E', 18), ('KEY_R', 19), ('KEY_T', 20), ('KEY_Y', 21), ('KEY_U', 22), ('KEY_I', 23), ('KEY_O', 24), ('KEY_P', 25), ('KEY_LEFTBRACE', 26), ('KEY_RIGHTBRACE', 27), ('KEY_ENTER', 28), ('KEY_LEFTCTRL', 29), ('KEY_A', 30), ('KEY_S', 31), ('KEY_D', 32), ('KEY_F', 33), ('KEY_G', 34), ('KEY_H', 35), ('KEY_J', 36), ('KEY_K', 37), ('KEY_L', 38), ('KEY_SEMICOLON', 39), ('KEY_APOSTROPHE', 40), ('KEY_GRAVE', 41), ('KEY_LEFTSHIFT', 42), ('KEY_BACKSLASH', 43), ('KEY_Z', 44), ('KEY_X', 45), ('KEY_C', 46), ('KEY_V', 47), ('KEY_B', 48), ('KEY_N', 49), ('KEY_M', 50), ('KEY_COMMA', 51), ('KEY_DOT', 52), ('KEY_SLASH', 53), ('KEY_RIGHTSHIFT', 54), ('KEY_KPASTERISK', 55), ('KEY_LEFTALT', 56), ('KEY_SPACE', 57), ('KEY_CAPSLOCK', 58), ('KEY_F1', 59), ('KEY_F2', 60), ('KEY_F3', 61), ('KEY_F4', 62), ('KEY_F5', 63), ('KEY_F6', 64), ('KEY_F7', 65), ('KEY_F8', 66), ('KEY_F9', 67), ('KEY_F10', 68), ('KEY_NUMLOCK', 69), ('KEY_SCROLLLOCK', 70), ('KEY_KP7', 71), ('KEY_KP8', 72), ('KEY_KP9', 73), ('KEY_KPMINUS', 74), ('KEY_KP4', 75), ('KEY_KP5', 76), ('KEY_KP6', 77), ('KEY_KPPLUS', 78), ('KEY_KP1', 79), ('KEY_KP2', 80), ('KEY_KP3', 81), ('KEY_KP0', 82), ('KEY_KPDOT', 83), ('?', 84), ('KEY_ZENKAKUHANKAKU', 85), ('KEY_102ND', 86), ('KEY_F11', 87), ('KEY_F12', 88), ('KEY_RO', 89), ('KEY_KATAKANA', 90), ('KEY_HIRAGANA', 91), ('KEY_HENKAN', 92), ('KEY_KATAKANAHIRAGANA', 93), ('KEY_MUHENKAN', 94), ('KEY_KPJPCOMMA', 95), ('KEY_KPENTER', 96), ('KEY_RIGHTCTRL', 97), ('KEY_KPSLASH', 98), ('KEY_SYSRQ', 99), ('KEY_RIGHTALT', 100), ('KEY_LINEFEED', 101), ('KEY_HOME', 102), ('KEY_UP', 103), ('KEY_PAGEUP', 104), ('KEY_LEFT', 105), ('KEY_RIGHT', 106), ('KEY_END', 107), ('KEY_DOWN', 108), ('KEY_PAGEDOWN', 109), ('KEY_INSERT', 110), ('KEY_DELETE', 111), ('KEY_MACRO', 112), (['KEY_MIN_INTERESTING', 'KEY_MUTE'], 113), ('KEY_VOLUMEDOWN', 114), ('KEY_VOLUMEUP', 115), ('KEY_POWER', 116), ('KEY_KPEQUAL', 117), ('KEY_KPPLUSMINUS', 118), ('KEY_PAUSE', 119), ('KEY_SCALE', 120), ('KEY_KPCOMMA', 121), (['KEY_HANGEUL', 'KEY_HANGUEL'], 122), ('KEY_HANJA', 123), ('KEY_YEN', 124), ('KEY_LEFTMETA', 125), ('KEY_RIGHTMETA', 126), ('KEY_COMPOSE', 127), ('KEY_STOP', 128), ('KEY_AGAIN', 129), ('KEY_PROPS', 130), ('KEY_UNDO', 131), ('KEY_FRONT', 132), ('KEY_COPY', 133), ('KEY_OPEN', 134), ('KEY_PASTE', 135), ('KEY_FIND', 136), ('KEY_CUT', 137), ('KEY_HELP', 138), ('KEY_MENU', 139), ('KEY_CALC', 140), ('KEY_SETUP', 141), ('KEY_SLEEP', 142), ('KEY_WAKEUP', 143), ('KEY_FILE', 144), ('KEY_SENDFILE', 145), ('KEY_DELETEFILE', 146), ('KEY_XFER', 147), ('KEY_PROG1', 148), ('KEY_PROG2', 149), ('KEY_WWW', 150), ('KEY_MSDOS', 151), (['KEY_COFFEE', 'KEY_SCREENLOCK'], 152), (['KEY_DIRECTION', 'KEY_ROTATE_DISPLAY'], 153), ('KEY_CYCLEWINDOWS', 154), ('KEY_MAIL', 155), ('KEY_BOOKMARKS', 156), ('KEY_COMPUTER', 157), ('KEY_BACK', 158), ('KEY_FORWARD', 159), ('KEY_CLOSECD', 160), ('KEY_EJECTCD', 161), ('KEY_EJECTCLOSECD', 162), ('KEY_NEXTSONG', 163), ('KEY_PLAYPAUSE', 164), ('KEY_PREVIOUSSONG', 165), ('KEY_STOPCD', 166), ('KEY_RECORD', 167), ('KEY_REWIND', 168), ('KEY_PHONE', 169), ('KEY_ISO', 170), ('KEY_CONFIG', 171), ('KEY_HOMEPAGE', 172), ('KEY_REFRESH', 173), ('KEY_EXIT', 174), ('KEY_MOVE', 175), ('KEY_EDIT', 176), ('KEY_SCROLLUP', 177), ('KEY_SCROLLDOWN', 178), ('KEY_KPLEFTPAREN', 179), ('KEY_KPRIGHTPAREN', 180), ('KEY_NEW', 181), ('KEY_REDO', 182), ('KEY_F13', 183), ('KEY_F14', 184), ('KEY_F15', 185), ('KEY_F16', 186), ('KEY_F17', 187), ('KEY_F18', 188), ('KEY_F19', 189), ('KEY_F20', 190), ('KEY_F21', 191), ('KEY_F22', 192), ('KEY_F23', 193), ('KEY_F24', 194), ('?', 195), ('?', 196), ('?', 197), ('?', 198), ('?', 199), ('KEY_PLAYCD', 200), ('KEY_PAUSECD', 201), ('KEY_PROG3', 202), ('KEY_PROG4', 203), ('KEY_DASHBOARD', 204), ('KEY_SUSPEND', 205), ('KEY_CLOSE', 206), ('KEY_PLAY', 207), ('KEY_FASTFORWARD', 208), ('KEY_BASSBOOST', 209), ('KEY_PRINT', 210), ('KEY_HP', 211), ('KEY_CAMERA', 212), ('KEY_SOUND', 213), ('KEY_QUESTION', 214), ('KEY_EMAIL', 215), ('KEY_CHAT', 216), ('KEY_SEARCH', 217), ('KEY_CONNECT', 218), ('KEY_FINANCE', 219), ('KEY_SPORT', 220), ('KEY_SHOP', 221), ('KEY_ALTERASE', 222), ('KEY_CANCEL', 223), ('KEY_BRIGHTNESSDOWN', 224), ('KEY_BRIGHTNESSUP', 225), ('KEY_MEDIA', 226), ('KEY_SWITCHVIDEOMODE', 227), ('KEY_KBDILLUMTOGGLE', 228), ('KEY_KBDILLUMDOWN', 229), ('KEY_KBDILLUMUP', 230), ('KEY_SEND', 231), ('KEY_REPLY', 232), ('KEY_FORWARDMAIL', 233), ('KEY_SAVE', 234), ('KEY_DOCUMENTS', 235), ('KEY_BATTERY', 236), ('KEY_BLUETOOTH', 237), ('KEY_WLAN', 238), ('KEY_UWB', 239), ('KEY_UNKNOWN', 240), ('KEY_VIDEO_NEXT', 241), ('KEY_VIDEO_PREV', 242), ('KEY_BRIGHTNESS_CYCLE', 243), (['KEY_BRIGHTNESS_AUTO', 'KEY_BRIGHTNESS_ZERO'], 244), ('KEY_DISPLAY_OFF', 245), (['KEY_WIMAX', 'KEY_WWAN'], 246), ('KEY_RFKILL', 247), ('KEY_MICMUTE', 248), ('?', 249), ('?', 250), ('?', 251), ('?', 252), ('?', 253), ('?', 254), ('?', 255)]}
DEBUG: pid 29938, injector.py, line 82, numlockx not found
DEBUG: pid 29938, injector.py, line 404, Started injecting into /dev/input/event23, fd 20
INFO: pid 29938, ev_abs_mapper.py, line 151, Left joystick as wheel, right joystick as wheel
DEBUG: pid 29938, injector.py, line 404, Started injecting into /dev/input/event24, fd 23
DEBUG: pid 29938, injector.py, line 404, Started injecting into /dev/input/event25, fd 26
SPAM: pid 29938, keycode_mapper.py, line 150, got (1, 56, 1), maps to EV_KEY:48
SPAM: pid 29938, keycode_mapper.py, line 150, got (1, 36, 1), maps to EV_KEY:47
DEBUG: window.py, line 207, Closing window
DEBUG: reader.py, line 79, Sending close msg to reader
DEBUG: pid 29948, reader.py, line 158, Reader stopped
INFO: daemon.py, line 210, Stopping all injections
INFO: injector.py, line 436, Stopping injecting keycodes for device "SCController Mouse"
DEBUG: pid 29938, injector.py, line 283, Received close signal
DEBUG: pid 29938, injector.py, line 378, asyncio coroutines ended
DEBUG: injector.py, line 82, numlockx not found
DEBUG: window.py, line 207, Closing window

(key-mapper-gtk:29910): Gtk-CRITICAL **: 00:22:39.574: gtk_main_quit: assertion 'main_loops != NULL' failed

In this output I was trying to map the left joystick

$ sudo key-mapper-gtk -d
Loaded config from "/home/danrobi/.config/key-mapper/config.json"
Writing "/home/danrobi/.config/key-mapper/xmodmap.json"
INFO: logger.py, line 114, key-mapper 0.4.0
INFO: logger.py, line 117, python-evdev 1.1.2
WARNING: logger.py, line 124, Debug level will log all your keystrokes! Do not post this output in the internet if you typed in sensitive or private information with your device!
DEBUG: logger.py, line 129, pid 30042
WARNING: daemon.py, line 73, The daemon "key-mapper-service" is not running, mapping keys only works as long as the window is open.
DEBUG: daemon.py, line 131, Creating daemon
DEBUG: data.py, line 86, Found data at "/usr/share/key-mapper"
DEBUG: getdevices.py, line 93, Discovering device paths
SPAM: getdevices.py, line 116, Found "Microsoft X-Box 360 pad", /dev/input/event22, 
SPAM: getdevices.py, line 116, Found "SCController Mouse", /dev/input/event21, 
SPAM: getdevices.py, line 116, Found "SCController Keyboard", /dev/input/event20, 
SPAM: getdevices.py, line 116, Found "ACPI Virtual Keyboard Device", /dev/input/event19, 
SPAM: getdevices.py, line 116, Found "Logitech K400 Plus", /dev/input/event9, usb-0000:00:14.0-1.3:1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event8, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event7, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite System Control", /dev/input/event6, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Consumer Control", /dev/input/event5, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Keyboard", /dev/input/event4, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event3, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Video Bus", /dev/input/event2, LNXVIDEO
INFO: getdevices.py, line 179, Found "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
DEBUG: presets.py, line 144, The newest preset is "SCController Mouse", "new preset"
DEBUG: window.py, line 453, Selecting device "SCController Mouse"
DEBUG: window.py, line 265, "SCController Mouse" presets: "new preset"
DEBUG: window.py, line 501, Selecting preset "new preset"
INFO: mapping.py, line 139, Loading preset from "/home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json"
DEBUG: config.py, line 130, Changing "gamepad.joystick.left_purpose" to "wheel" in Mapping
DEBUG: config.py, line 130, Changing "gamepad.joystick.right_purpose" to "wheel" in Mapping
DEBUG: config.py, line 130, Changing "gamepad.joystick.pointer_speed" to "20.97537938439623" in Mapping
DEBUG: getdevices.py, line 93, Discovering device paths
SPAM: getdevices.py, line 116, Found "Microsoft X-Box 360 pad", /dev/input/event22, 
SPAM: getdevices.py, line 116, Found "SCController Mouse", /dev/input/event21, 
SPAM: getdevices.py, line 116, Found "SCController Keyboard", /dev/input/event20, 
SPAM: getdevices.py, line 116, Found "ACPI Virtual Keyboard Device", /dev/input/event19, 
SPAM: getdevices.py, line 116, Found "Logitech K400 Plus", /dev/input/event9, usb-0000:00:14.0-1.3:1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event8, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event7, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite System Control", /dev/input/event6, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Consumer Control", /dev/input/event5, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Keyboard", /dev/input/event4, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event3, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Video Bus", /dev/input/event2, LNXVIDEO
INFO: getdevices.py, line 179, Found "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
DEBUG: reader.py, line 119, Starting reading keycodes from "Microsoft X-Box 360 pad", "SCController Mouse", "SCController Keyboard", "ACPI Virtual Keyboard Device"
SPAM: pid 30051, reader.py, line 139, got (1, 36, 1)
SPAM: pid 30051, reader.py, line 139, got (1, 36, 0)
DEBUG: mapping.py, line 91, (1, 36, 1) will map to v, replacing None
SPAM: pid 30051, reader.py, line 139, got (1, 106, 1)
SPAM: pid 30051, reader.py, line 139, got (1, 106, 0)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 1)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 0)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 1)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 0)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 1)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 0)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 1)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 0)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 1)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 0)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 1)
SPAM: pid 30051, reader.py, line 139, got (1, 272, 0)
INFO: window.py, line 572, Updating configs for "SCController Mouse", "new preset"
INFO: mapping.py, line 195, Saving preset to /home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json
DEBUG: window.py, line 265, "SCController Mouse" presets: "new preset"
DEBUG: window.py, line 408, Applying preset "new preset" for "SCController Mouse"
INFO: config.py, line 228, Loaded config from "/home/danrobi/.config/key-mapper/config.json"
INFO: mapping.py, line 139, Loading preset from "/home/danrobi/.config/key-mapper/presets/SCController Mouse/new preset.json"
SPAM: mapping.py, line 175, (1, 36, 1) maps to v
DEBUG: daemon.py, line 189, Using keycodes from "/home/danrobi/.config/key-mapper/xmodmap.json"
DEBUG: reader.py, line 79, Sending close msg to reader
DEBUG: pid 30051, reader.py, line 158, Reader stopped
INFO: pid 30054, injector.py, line 300, Starting injecting the mapping for "SCController Mouse"
DEBUG: pid 30054, injector.py, line 200, Grab /dev/input/event22
DEBUG: pid 30054, injector.py, line 311, Parsing macros for /dev/input/event22
DEBUG: getdevices.py, line 93, Discovering device paths
SPAM: getdevices.py, line 116, Found "key-mapper SCController Mouse", /dev/input/event23, key-mapper
SPAM: getdevices.py, line 116, Found "Microsoft X-Box 360 pad", /dev/input/event22, 
SPAM: getdevices.py, line 116, Found "SCController Mouse", /dev/input/event21, 
SPAM: getdevices.py, line 116, Found "SCController Keyboard", /dev/input/event20, 
SPAM: getdevices.py, line 116, Found "ACPI Virtual Keyboard Device", /dev/input/event19, 
SPAM: getdevices.py, line 116, Found "Logitech K400 Plus", /dev/input/event9, usb-0000:00:14.0-1.3:1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event8, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event7, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite System Control", /dev/input/event6, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Consumer Control", /dev/input/event5, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite Keyboard", /dev/input/event4, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Razer Razer DeathAdder Elite", /dev/input/event3, usb-0000:04:00.0-1
SPAM: getdevices.py, line 116, Found "Video Bus", /dev/input/event2, LNXVIDEO
INFO: getdevices.py, line 179, Found "key-mapper SCController Mouse", "SCController Mouse", "Logitech K400 Plus", "Razer Razer DeathAdder Elite", "Video Bus"
DEBUG: reader.py, line 119, Starting reading keycodes from "Microsoft X-Box 360 pad", "SCController Mouse", "SCController Keyboard", "ACPI Virtual Keyboard Device"
SPAM: pid 30054, injector.py, line 332, Injected capabilities for "/dev/input/event22": {('EV_SYN', 0): [('SYN_REPORT', 0), ('SYN_CONFIG', 1), ('SYN_MT_REPORT', 2), ('?', 21)], ('EV_KEY', 1): [('KEY_V', 47), (['BTN_A', 'BTN_GAMEPAD', 'BTN_SOUTH'], 304), (['BTN_B', 'BTN_EAST'], 305), (['BTN_NORTH', 'BTN_X'], 307), (['BTN_WEST', 'BTN_Y'], 308), ('BTN_TL', 310), ('BTN_TR', 311), ('BTN_SELECT', 314), ('BTN_START', 315), ('BTN_MODE', 316), ('BTN_THUMBL', 317), ('BTN_THUMBR', 318)], ('EV_REL', 2): [('REL_X', 0), ('REL_Y', 1), ('REL_WHEEL', 8)]}
DEBUG: pid 30054, injector.py, line 189, No need to grab /dev/input/event21
INFO: window.py, line 466, This device is currently mapped.
DEBUG: pid 30054, injector.py, line 200, Grab /dev/input/event20
DEBUG: pid 30054, injector.py, line 311, Parsing macros for /dev/input/event20
SPAM: pid 30054, injector.py, line 332, Injected capabilities for "/dev/input/event20": {('EV_SYN', 0): [('SYN_REPORT', 0), ('SYN_CONFIG', 1), ('?', 4), ('?', 21)], ('EV_KEY', 1): [('KEY_ESC', 1), ('KEY_1', 2), ('KEY_2', 3), ('KEY_3', 4), ('KEY_4', 5), ('KEY_5', 6), ('KEY_6', 7), ('KEY_7', 8), ('KEY_8', 9), ('KEY_9', 10), ('KEY_0', 11), ('KEY_MINUS', 12), ('KEY_EQUAL', 13), ('KEY_BACKSPACE', 14), ('KEY_TAB', 15), ('KEY_Q', 16), ('KEY_W', 17), ('KEY_E', 18), ('KEY_R', 19), ('KEY_T', 20), ('KEY_Y', 21), ('KEY_U', 22), ('KEY_I', 23), ('KEY_O', 24), ('KEY_P', 25), ('KEY_LEFTBRACE', 26), ('KEY_RIGHTBRACE', 27), ('KEY_ENTER', 28), ('KEY_LEFTCTRL', 29), ('KEY_A', 30), ('KEY_S', 31), ('KEY_D', 32), ('KEY_F', 33), ('KEY_G', 34), ('KEY_H', 35), ('KEY_J', 36), ('KEY_K', 37), ('KEY_L', 38), ('KEY_SEMICOLON', 39), ('KEY_APOSTROPHE', 40), ('KEY_GRAVE', 41), ('KEY_LEFTSHIFT', 42), ('KEY_BACKSLASH', 43), ('KEY_Z', 44), ('KEY_X', 45), ('KEY_C', 46), ('KEY_V', 47), ('KEY_B', 48), ('KEY_N', 49), ('KEY_M', 50), ('KEY_COMMA', 51), ('KEY_DOT', 52), ('KEY_SLASH', 53), ('KEY_RIGHTSHIFT', 54), ('KEY_KPASTERISK', 55), ('KEY_LEFTALT', 56), ('KEY_SPACE', 57), ('KEY_CAPSLOCK', 58), ('KEY_F1', 59), ('KEY_F2', 60), ('KEY_F3', 61), ('KEY_F4', 62), ('KEY_F5', 63), ('KEY_F6', 64), ('KEY_F7', 65), ('KEY_F8', 66), ('KEY_F9', 67), ('KEY_F10', 68), ('KEY_NUMLOCK', 69), ('KEY_SCROLLLOCK', 70), ('KEY_KP7', 71), ('KEY_KP8', 72), ('KEY_KP9', 73), ('KEY_KPMINUS', 74), ('KEY_KP4', 75), ('KEY_KP5', 76), ('KEY_KP6', 77), ('KEY_KPPLUS', 78), ('KEY_KP1', 79), ('KEY_KP2', 80), ('KEY_KP3', 81), ('KEY_KP0', 82), ('KEY_KPDOT', 83), ('KEY_102ND', 86), ('KEY_F11', 87), ('KEY_F12', 88), ('KEY_KPENTER', 96), ('KEY_RIGHTCTRL', 97), ('KEY_KPSLASH', 98), ('KEY_SYSRQ', 99), ('KEY_RIGHTALT', 100), ('KEY_HOME', 102), ('KEY_UP', 103), ('KEY_PAGEUP', 104), ('KEY_LEFT', 105), ('KEY_RIGHT', 106), ('KEY_END', 107), ('KEY_DOWN', 108), ('KEY_PAGEDOWN', 109), ('KEY_INSERT', 110), ('KEY_DELETE', 111), (['KEY_MIN_INTERESTING', 'KEY_MUTE'], 113), ('KEY_VOLUMEDOWN', 114), ('KEY_VOLUMEUP', 115), ('KEY_PAUSE', 119), ('KEY_LEFTMETA', 125), ('KEY_RIGHTMETA', 126), ('KEY_COMPOSE', 127), ('KEY_BACK', 158), ('KEY_FORWARD', 159), ('KEY_NEXTSONG', 163), ('KEY_PLAYPAUSE', 164), ('KEY_PREVIOUSSONG', 165), ('KEY_CONFIG', 171), ('KEY_HOMEPAGE', 172)], ('EV_MSC', 4): [('MSC_SCAN', 4)]}
DEBUG: pid 30054, injector.py, line 200, Grab /dev/input/event19
DEBUG: pid 30054, injector.py, line 311, Parsing macros for /dev/input/event19
SPAM: pid 30054, injector.py, line 332, Injected capabilities for "/dev/input/event19": {('EV_SYN', 0): [('SYN_REPORT', 0), ('SYN_CONFIG', 1), ('?', 21)], ('EV_KEY', 1): [('KEY_ESC', 1), ('KEY_1', 2), ('KEY_2', 3), ('KEY_3', 4), ('KEY_4', 5), ('KEY_5', 6), ('KEY_6', 7), ('KEY_7', 8), ('KEY_8', 9), ('KEY_9', 10), ('KEY_0', 11), ('KEY_MINUS', 12), ('KEY_EQUAL', 13), ('KEY_BACKSPACE', 14), ('KEY_TAB', 15), ('KEY_Q', 16), ('KEY_W', 17), ('KEY_E', 18), ('KEY_R', 19), ('KEY_T', 20), ('KEY_Y', 21), ('KEY_U', 22), ('KEY_I', 23), ('KEY_O', 24), ('KEY_P', 25), ('KEY_LEFTBRACE', 26), ('KEY_RIGHTBRACE', 27), ('KEY_ENTER', 28), ('KEY_LEFTCTRL', 29), ('KEY_A', 30), ('KEY_S', 31), ('KEY_D', 32), ('KEY_F', 33), ('KEY_G', 34), ('KEY_H', 35), ('KEY_J', 36), ('KEY_K', 37), ('KEY_L', 38), ('KEY_SEMICOLON', 39), ('KEY_APOSTROPHE', 40), ('KEY_GRAVE', 41), ('KEY_LEFTSHIFT', 42), ('KEY_BACKSLASH', 43), ('KEY_Z', 44), ('KEY_X', 45), ('KEY_C', 46), ('KEY_V', 47), ('KEY_B', 48), ('KEY_N', 49), ('KEY_M', 50), ('KEY_COMMA', 51), ('KEY_DOT', 52), ('KEY_SLASH', 53), ('KEY_RIGHTSHIFT', 54), ('KEY_KPASTERISK', 55), ('KEY_LEFTALT', 56), ('KEY_SPACE', 57), ('KEY_CAPSLOCK', 58), ('KEY_F1', 59), ('KEY_F2', 60), ('KEY_F3', 61), ('KEY_F4', 62), ('KEY_F5', 63), ('KEY_F6', 64), ('KEY_F7', 65), ('KEY_F8', 66), ('KEY_F9', 67), ('KEY_F10', 68), ('KEY_NUMLOCK', 69), ('KEY_SCROLLLOCK', 70), ('KEY_KP7', 71), ('KEY_KP8', 72), ('KEY_KP9', 73), ('KEY_KPMINUS', 74), ('KEY_KP4', 75), ('KEY_KP5', 76), ('KEY_KP6', 77), ('KEY_KPPLUS', 78), ('KEY_KP1', 79), ('KEY_KP2', 80), ('KEY_KP3', 81), ('KEY_KP0', 82), ('KEY_KPDOT', 83), ('?', 84), ('KEY_ZENKAKUHANKAKU', 85), ('KEY_102ND', 86), ('KEY_F11', 87), ('KEY_F12', 88), ('KEY_RO', 89), ('KEY_KATAKANA', 90), ('KEY_HIRAGANA', 91), ('KEY_HENKAN', 92), ('KEY_KATAKANAHIRAGANA', 93), ('KEY_MUHENKAN', 94), ('KEY_KPJPCOMMA', 95), ('KEY_KPENTER', 96), ('KEY_RIGHTCTRL', 97), ('KEY_KPSLASH', 98), ('KEY_SYSRQ', 99), ('KEY_RIGHTALT', 100), ('KEY_LINEFEED', 101), ('KEY_HOME', 102), ('KEY_UP', 103), ('KEY_PAGEUP', 104), ('KEY_LEFT', 105), ('KEY_RIGHT', 106), ('KEY_END', 107), ('KEY_DOWN', 108), ('KEY_PAGEDOWN', 109), ('KEY_INSERT', 110), ('KEY_DELETE', 111), ('KEY_MACRO', 112), (['KEY_MIN_INTERESTING', 'KEY_MUTE'], 113), ('KEY_VOLUMEDOWN', 114), ('KEY_VOLUMEUP', 115), ('KEY_POWER', 116), ('KEY_KPEQUAL', 117), ('KEY_KPPLUSMINUS', 118), ('KEY_PAUSE', 119), ('KEY_SCALE', 120), ('KEY_KPCOMMA', 121), (['KEY_HANGEUL', 'KEY_HANGUEL'], 122), ('KEY_HANJA', 123), ('KEY_YEN', 124), ('KEY_LEFTMETA', 125), ('KEY_RIGHTMETA', 126), ('KEY_COMPOSE', 127), ('KEY_STOP', 128), ('KEY_AGAIN', 129), ('KEY_PROPS', 130), ('KEY_UNDO', 131), ('KEY_FRONT', 132), ('KEY_COPY', 133), ('KEY_OPEN', 134), ('KEY_PASTE', 135), ('KEY_FIND', 136), ('KEY_CUT', 137), ('KEY_HELP', 138), ('KEY_MENU', 139), ('KEY_CALC', 140), ('KEY_SETUP', 141), ('KEY_SLEEP', 142), ('KEY_WAKEUP', 143), ('KEY_FILE', 144), ('KEY_SENDFILE', 145), ('KEY_DELETEFILE', 146), ('KEY_XFER', 147), ('KEY_PROG1', 148), ('KEY_PROG2', 149), ('KEY_WWW', 150), ('KEY_MSDOS', 151), (['KEY_COFFEE', 'KEY_SCREENLOCK'], 152), (['KEY_DIRECTION', 'KEY_ROTATE_DISPLAY'], 153), ('KEY_CYCLEWINDOWS', 154), ('KEY_MAIL', 155), ('KEY_BOOKMARKS', 156), ('KEY_COMPUTER', 157), ('KEY_BACK', 158), ('KEY_FORWARD', 159), ('KEY_CLOSECD', 160), ('KEY_EJECTCD', 161), ('KEY_EJECTCLOSECD', 162), ('KEY_NEXTSONG', 163), ('KEY_PLAYPAUSE', 164), ('KEY_PREVIOUSSONG', 165), ('KEY_STOPCD', 166), ('KEY_RECORD', 167), ('KEY_REWIND', 168), ('KEY_PHONE', 169), ('KEY_ISO', 170), ('KEY_CONFIG', 171), ('KEY_HOMEPAGE', 172), ('KEY_REFRESH', 173), ('KEY_EXIT', 174), ('KEY_MOVE', 175), ('KEY_EDIT', 176), ('KEY_SCROLLUP', 177), ('KEY_SCROLLDOWN', 178), ('KEY_KPLEFTPAREN', 179), ('KEY_KPRIGHTPAREN', 180), ('KEY_NEW', 181), ('KEY_REDO', 182), ('KEY_F13', 183), ('KEY_F14', 184), ('KEY_F15', 185), ('KEY_F16', 186), ('KEY_F17', 187), ('KEY_F18', 188), ('KEY_F19', 189), ('KEY_F20', 190), ('KEY_F21', 191), ('KEY_F22', 192), ('KEY_F23', 193), ('KEY_F24', 194), ('?', 195), ('?', 196), ('?', 197), ('?', 198), ('?', 199), ('KEY_PLAYCD', 200), ('KEY_PAUSECD', 201), ('KEY_PROG3', 202), ('KEY_PROG4', 203), ('KEY_DASHBOARD', 204), ('KEY_SUSPEND', 205), ('KEY_CLOSE', 206), ('KEY_PLAY', 207), ('KEY_FASTFORWARD', 208), ('KEY_BASSBOOST', 209), ('KEY_PRINT', 210), ('KEY_HP', 211), ('KEY_CAMERA', 212), ('KEY_SOUND', 213), ('KEY_QUESTION', 214), ('KEY_EMAIL', 215), ('KEY_CHAT', 216), ('KEY_SEARCH', 217), ('KEY_CONNECT', 218), ('KEY_FINANCE', 219), ('KEY_SPORT', 220), ('KEY_SHOP', 221), ('KEY_ALTERASE', 222), ('KEY_CANCEL', 223), ('KEY_BRIGHTNESSDOWN', 224), ('KEY_BRIGHTNESSUP', 225), ('KEY_MEDIA', 226), ('KEY_SWITCHVIDEOMODE', 227), ('KEY_KBDILLUMTOGGLE', 228), ('KEY_KBDILLUMDOWN', 229), ('KEY_KBDILLUMUP', 230), ('KEY_SEND', 231), ('KEY_REPLY', 232), ('KEY_FORWARDMAIL', 233), ('KEY_SAVE', 234), ('KEY_DOCUMENTS', 235), ('KEY_BATTERY', 236), ('KEY_BLUETOOTH', 237), ('KEY_WLAN', 238), ('KEY_UWB', 239), ('KEY_UNKNOWN', 240), ('KEY_VIDEO_NEXT', 241), ('KEY_VIDEO_PREV', 242), ('KEY_BRIGHTNESS_CYCLE', 243), (['KEY_BRIGHTNESS_AUTO', 'KEY_BRIGHTNESS_ZERO'], 244), ('KEY_DISPLAY_OFF', 245), (['KEY_WIMAX', 'KEY_WWAN'], 246), ('KEY_RFKILL', 247), ('KEY_MICMUTE', 248), ('?', 249), ('?', 250), ('?', 251), ('?', 252), ('?', 253), ('?', 254), ('?', 255)]}
DEBUG: pid 30054, injector.py, line 82, numlockx not found
DEBUG: pid 30054, injector.py, line 404, Started injecting into /dev/input/event23, fd 20
INFO: pid 30054, ev_abs_mapper.py, line 151, Left joystick as wheel, right joystick as wheel
DEBUG: pid 30054, injector.py, line 404, Started injecting into /dev/input/event24, fd 23
DEBUG: pid 30054, injector.py, line 404, Started injecting into /dev/input/event25, fd 26
DEBUG: window.py, line 207, Closing window
DEBUG: reader.py, line 79, Sending close msg to reader
DEBUG: pid 30063, reader.py, line 158, Reader stopped
INFO: daemon.py, line 210, Stopping all injections
INFO: injector.py, line 436, Stopping injecting keycodes for device "SCController Mouse"
DEBUG: pid 30054, injector.py, line 283, Received close signal
DEBUG: pid 30054, injector.py, line 378, asyncio coroutines ended
DEBUG: injector.py, line 82, numlockx not found
DEBUG: window.py, line 207, Closing window

(key-mapper-gtk:30042): Gtk-CRITICAL **: 00:26:51.161: gtk_main_quit: assertion 'main_loops != NULL' failed
sezanzeb commented 3 years ago

Thanks for staying here, all the stuff we figure out here helps to make the tool better for everyone who uses it.

I don't see bumper and trigger events. Lets check what kind of events they send to the kernel. Please run sudo evtest (without a key-mapper injection active), select your steam controller and hit each button/trigger that doesn't work once. Try to group the output nicely and label them by the key you were using. Basically, please show me which evtest output was caused by which key. The trigger might write tons of events, you don't need to include all of them.


SPAM: getdevices.py, line 116, Found "Microsoft X-Box 360 pad", /dev/input/event22, 
SPAM: getdevices.py, line 116, Found "SCController Mouse", /dev/input/event21, 
SPAM: getdevices.py, line 116, Found "SCController Keyboard", /dev/input/event20, 
SPAM: getdevices.py, line 116, Found "ACPI Virtual Keyboard Device", /dev/input/event19, 

This doesn't look right, there is something missing. I have pushed a potential fix, but i'm not quite sure yet if that was the problem. Could you please run

#!/usr/bin/python3
import evdev
devices = [evdev.InputDevice(path) for path in evdev.list_devices()]
for device in devices:
    print(str(device.info), '|', device.phys, '|', device.name)

with sudo for me and post the output?

danrobi11 commented 3 years ago

My Steam controller has been config to set both triggers to the left mouse action. I probably configured that with the Steam client in the past. Heres the sudo evtest triggers left/right output for Input device name: "SCController Mouse":

Event: time 1609096565.544179, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
Event: time 1609096565.544179, -------------- SYN_REPORT ------------
Event: time 1609096565.590321, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
Event: time 1609096565.590321, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
Event: time 1609096565.590321, -------------- SYN_REPORT ------------
Event: time 1609096565.698167, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
Event: time 1609096565.698167, -------------- SYN_REPORT ------------
Event: time 1609096567.723342, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
Event: time 1609096567.723342, -------------- SYN_REPORT ------------
Event: time 1609096567.903421, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
Event: time 1609096567.903421, -------------- SYN_REPORT ------------

Heres the Joystick up/down/left/right output for Input device name: "SCController Keyboard":

Event: time 1609096704.376601, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70052
Event: time 1609096704.376601, type 1 (EV_KEY), code 103 (KEY_UP), value 1
Event: time 1609096704.376601, -------------- SYN_REPORT ------------
^[[AEvent: time 1609096704.581488, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70052
Event: time 1609096704.581488, type 1 (EV_KEY), code 103 (KEY_UP), value 0
Event: time 1609096704.581488, -------------- SYN_REPORT ------------
Event: time 1609096715.066850, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004f
Event: time 1609096715.066850, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 1
Event: time 1609096715.066850, -------------- SYN_REPORT ------------
^[[CEvent: time 1609096715.273795, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7004f
Event: time 1609096715.273795, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 0
Event: time 1609096715.273795, -------------- SYN_REPORT ------------
Event: time 1609096716.065913, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70050
Event: time 1609096716.065913, type 1 (EV_KEY), code 105 (KEY_LEFT), value 1
Event: time 1609096716.065913, -------------- SYN_REPORT ------------
^[[DEvent: time 1609096716.254744, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70050
Event: time 1609096716.254744, type 1 (EV_KEY), code 105 (KEY_LEFT), value 0
Event: time 1609096716.254744, -------------- SYN_REPORT ------------
Event: time 1609096716.803806, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70051
Event: time 1609096716.803806, type 1 (EV_KEY), code 108 (KEY_DOWN), value 1
Event: time 1609096716.803806, -------------- SYN_REPORT ------------
^[[BEvent: time 1609096716.956759, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70051
Event: time 1609096716.956759, type 1 (EV_KEY), code 108 (KEY_DOWN), value 0
Event: time 1609096716.956759, -------------- SYN_REPORT ------------

Left bumper output for Input device name: "SCController Keyboard": ( The right bumper does not register to any SCController.

Event: time 1609096949.641650, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e2
Event: time 1609096949.641650, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 1
Event: time 1609096949.641650, -------------- SYN_REPORT ------------
Event: time 1609096949.785558, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e2
Event: time 1609096949.785558, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 0
Event: time 1609096949.785558, -------------- SYN_REPORT ------------

Heres the #!/usr/bin/python3 output:

$ sudo ./test_keymapper
bus: 0003, vendor 045e, product 028e, version 0110 |  | Microsoft X-Box 360 pad
bus: 0003, vendor 28de, product 1142, version 0001 |  | SCController Mouse
bus: 0003, vendor 28de, product 1142, version 0001 |  | SCController Keyboard
bus: 0003, vendor 0000, product 0000, version 0004 |  | ACPI Virtual Keyboard Device
bus: 0000, vendor 0000, product 0000, version 0000 | ALSA | HDA Intel PCH HDMI/DP,pcm=8
bus: 0000, vendor 0000, product 0000, version 0000 | ALSA | HDA Intel PCH HDMI/DP,pcm=7
bus: 0000, vendor 0000, product 0000, version 0000 | ALSA | HDA Intel PCH HDMI/DP,pcm=3
bus: 0000, vendor 0000, product 0000, version 0000 | ALSA | HDA Intel PCH Line Out CLFE
bus: 0000, vendor 0000, product 0000, version 0000 | ALSA | HDA Intel PCH Line Out Surround
bus: 0000, vendor 0000, product 0000, version 0000 | ALSA | HDA Intel PCH Line Out Front
bus: 0000, vendor 0000, product 0000, version 0000 | ALSA | HDA Intel PCH Line
bus: 0000, vendor 0000, product 0000, version 0000 | ALSA | HDA Intel PCH Rear Mic
bus: 0001, vendor 10ec, product 0899, version 0001 | card0/codec#0/beep0 | HDA Digital PCBeep
bus: 0003, vendor 046d, product 404d, version 0111 | usb-0000:00:14.0-1.3:1 | Logitech K400 Plus
bus: 0003, vendor 1532, product 005c, version 0111 | usb-0000:04:00.0-1/input2 | Razer Razer DeathAdder Elite
bus: 0003, vendor 1532, product 005c, version 0111 | usb-0000:04:00.0-1/input1 | Razer Razer DeathAdder Elite
bus: 0003, vendor 1532, product 005c, version 0111 | usb-0000:04:00.0-1/input1 | Razer Razer DeathAdder Elite System Control
bus: 0003, vendor 1532, product 005c, version 0111 | usb-0000:04:00.0-1/input1 | Razer Razer DeathAdder Elite Consumer Control
bus: 0003, vendor 1532, product 005c, version 0111 | usb-0000:04:00.0-1/input1 | Razer Razer DeathAdder Elite Keyboard
bus: 0003, vendor 1532, product 005c, version 0111 | usb-0000:04:00.0-1/input0 | Razer Razer DeathAdder Elite
bus: 0019, vendor 0000, product 0006, version 0000 | LNXVIDEO/video/input0 | Video Bus
bus: 0019, vendor 0000, product 0001, version 0000 | LNXPWRBN/button/input0 | Power Button
bus: 0019, vendor 0000, product 0001, version 0000 | PNP0C0C/button/input0 | Power Button
sezanzeb commented 3 years ago

nice, thanks

yes, that's the reason. key-mapper won't map button left to avoid breaking the input device, because it is still needed to stop the injection if anything goes wrong.

thanks for running this stuff. The solution I pushed for the | | problem should work fine.

danrobi11 commented 3 years ago

The solution I pushed for the | | problem should work fine.

Yes, joystick left and right are now working. But it took a few try before they registred.

sezanzeb commented 3 years ago

The problem with KEY_LEFT and such is that it changes the focus in the application. I'll check what I can do about that.

danrobi11 commented 3 years ago

So the triggers assign to mouse action, they wont ever work? I'd need to install Steam and remap the controller to a normal X-Box 360 pad in order for the triggers to work?

sezanzeb commented 3 years ago

Both triggers report the same kind of event in your case (btn_left), so you would only be able to map both at the same time, but not individually.

You can still edit the configuration file of the preset manually. Insert this

{
    "mapping": {
        "1,272,1": "a"
    }
}

into touch ~/.config/key-mapper/presets/Microsoft\ X-Box\ 360\ pad/btn_left.json (or whatever the folder name is, it should already exist), then open this preset in the gui to add the rest. (Or insert the line into any other existing preset). Also see usage.md#configuration-files

key-mapper cannot send mappings to the device firmware, there is no universal way to do that. Since ratbag doesn't have support for the xbox 360 controller you are probably left with installing steam.

sezanzeb commented 3 years ago

A fix for mapping arrow keys has just been pushed

danrobi11 commented 3 years ago

A fix for mapping arrow keys has just been pushed

I confirm, left/right joystick working prefectly now.

Regarding your previous reply. I'll try to remap through Steam client to see whats up. And I'll let you know.

keep in mind that the Steam controller has been discontinued by Steam so its up to you If you want to fully support it. My guess is you could have a look at this here. I never had any issue remapping with the v.0.4.7 regardless of what the Steam controller buttons are previously mapped to.

sezanzeb commented 3 years ago

Thanks for checking!

The goal is to support anything that reports EV_KEY type events to the kernel.

And then there is the optional goal of supporting gamepad stuff as good as possible (like using the joystick as mouse or wheel, mapping joystick directions as buttons (the one that is a stick that points out of the gamepad, not implemented yet), mapping D-Pads)

danrobi11 commented 3 years ago

Key-mapper working perfectly now. I got it working by remapping all buttons to a "key" with sc-controller. Once that done key-mapper has no problem mapping every button, triggers and bumpers. Its not ideal but its working.

New edit: I've tried Steam. Flatpak because theres no Steam in my repo. Remapping with the Steam flatpak did not apply. Problably because flatpak sandboxe. That's why I 've remapped with sc-controller.

sezanzeb commented 3 years ago

I think this is as far as it can get with evdev of the kernel. The only thing left to improve here is being able to map the left mouse via the gui, but I need to think of a clever way to offer this option without making it easy to break peoples mice as long as the injection is on.

summary:

I'll close this issue now, if there is anything else feel free to either just comment here, reopen this or create a new issue.

danrobi11 commented 3 years ago

Fair enough. Thank you for the support!

sezanzeb commented 3 years ago

Thanks for helping out!