input remapper in game mode

I tried systemctl enable --now input-remapper.service And that's not loading my bindings
Solution:
Just tried it again and input-remapper is working in gamemode not sure what changed:AkkoShrug: I think it was removing my user from the input group...
Jump to solution
24 Replies
dnkmmr
dnkmmr2mo ago
What device are you using?
zany130
zany130OP2mo ago
I'm in a desktop PC I'm trying to get the back buttons if my flydigi apex 4 working On the kde desktop input remapper correcty auto loads my profile and the buttons work. Just trying to figure out how to get it to work in steam game mode Hmm I tried adding the input remapper gui as a steam shortcut but it doesn't run in game mode... Wonder if this is why
Sep 29 20:28:57 bazzite input-remapper-service[3680]: Request to autoload for "Microsoft X-Box 360 pad 0" Sep 29 20:28:57 bazzite input-remapper-service[3680]: ERROR: Request to autoload "Microsoft X-Box 360 pad 0" before a user told the service about their session
Sep 29 20:28:57 bazzite input-remapper-service[3680]: Request to autoload for "Microsoft X-Box 360 pad 0" Sep 29 20:28:57 bazzite input-remapper-service[3680]: ERROR: Request to autoload "Microsoft X-Box 360 pad 0" before a user told the service about their session
Other wise it's running fine
● input-remapper.service - Service to inject keycodes without the GUI application Loaded: loaded (/usr/lib/systemd/system/input-remapper.service; enabled; preset: disabled) Drop-In: /usr/lib/systemd/system/service.d └─10-timeout-abort.conf Active: active (running) since Sun 2024-09-29 20:27:34 EDT; 1h 49min ago Main PID: 3680 (input-remapper-) Tasks: 5 (limit: 38233) Memory: 36.5M (peak: 37.0M) CPU: 608ms CGroup: /system.slice/input-remapper.service ├─3680 /usr/bin/python3 /usr/bin/input-remapper-service └─4346 /usr/bin/python3 /usr/bin/input-remapper-service
● input-remapper.service - Service to inject keycodes without the GUI application Loaded: loaded (/usr/lib/systemd/system/input-remapper.service; enabled; preset: disabled) Drop-In: /usr/lib/systemd/system/service.d └─10-timeout-abort.conf Active: active (running) since Sun 2024-09-29 20:27:34 EDT; 1h 49min ago Main PID: 3680 (input-remapper-) Tasks: 5 (limit: 38233) Memory: 36.5M (peak: 37.0M) CPU: 608ms CGroup: /system.slice/input-remapper.service ├─3680 /usr/bin/python3 /usr/bin/input-remapper-service └─4346 /usr/bin/python3 /usr/bin/input-remapper-service
removing my user from the input group fixes the input remapper controller not showing up, but it is still getting its inputs from the original controller on steam.....
Aru
Aru2mo ago
I could never get input remapper working in game mode If you want an alternative, you could try https://github.com/ShadowBlip/InputPlumber/ it's made by the ChimeraOS devs, and it can explicitly remap one device to another device. e.g. remap keyboard buttons to a controller, etc
zany130
zany130OP2mo ago
ahh sucks thats the only way to be able to fully use the apex 4 controller
Aru
Aru2mo ago
if you do try input plumber, you'd have to ask about it on the chimeraOS discord
zany130
zany130OP2mo ago
yeah heard about inputplumber talked to the dev about getting the apex 4 controller supported they where intreasted but were behind a back log
Aru
Aru2mo ago
you could try a custom config and DIY it e.g. you can create a device config where you tell it which devices to capture: https://github.com/ShadowBlip/InputPlumber/blob/1eff257f6588c6ba76705d85e5745b8f5da2ae81/rootfs/usr/share/inputplumber/devices/50-gpd_win4.yaml then create a capability map that maps inputs to the desired output:
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v1.json
# Schema version number
version: 1

# The type of configuration schema
kind: CapabilityMap

# Name for the device event map
name: GPD Type 3

# Unique identifier of the capability mapping
id: gpd3

# List of mapped events that are activated by a specific set of activation keys.
mapping:
- name: Left Paddle
source_events:
- keyboard: KeySysrq
target_event:
gamepad:
button: LeftPaddle1
- name: Right Paddle
source_events:
- keyboard: KeyPause
target_event:
gamepad:
button: QuickAccess

# List of events to filter from the source devices
filtered_events: []
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v1.json
# Schema version number
version: 1

# The type of configuration schema
kind: CapabilityMap

# Name for the device event map
name: GPD Type 3

# Unique identifier of the capability mapping
id: gpd3

# List of mapped events that are activated by a specific set of activation keys.
mapping:
- name: Left Paddle
source_events:
- keyboard: KeySysrq
target_event:
gamepad:
button: LeftPaddle1
- name: Right Paddle
source_events:
- keyboard: KeyPause
target_event:
gamepad:
button: QuickAccess

# List of events to filter from the source devices
filtered_events: []
e.g. this was a custom capability map I played around with for my GPD Win 4 where I wanted the right back button to be QAM instead of R4 it does require some technical knowledge to get it running though so YMMV
zany130
zany130OP2mo ago
thanks ill give it a try
Aru
Aru2mo ago
just letting you know that YMMV, InputPlumber is also a work in progress so you will probably see bugs you also need to place custom configs in a very specific folder so it'll be best to ask devs about it if it does work, you can finally change the controller type via this command in terminal:
busctl call org.shadowblip.InputPlumber /org/shadowblip/InputPlumber/CompositeDevice0 org.shadowblip.Input.CompositeDevice SetTargetDevices "as" 1 "replace_with_controller_mode_here"
busctl call org.shadowblip.InputPlumber /org/shadowblip/InputPlumber/CompositeDevice0 org.shadowblip.Input.CompositeDevice SetTargetDevices "as" 1 "replace_with_controller_mode_here"
example controller modes: xb360, ds5-edge, deck, xbox-elite oh, and finally, you might need to compile the rpm for bazzite, here's the spec if you need it: https://github.com/ShadowBlip/InputPlumber/blob/main/pkg/rpm/inputplumber.spec you can compile it in a distrobox, then install it via rpm-ostree
zany130
zany130OP2mo ago
I mean I just found a rpm in the releases and rpm-ostree that
Aru
Aru2mo ago
oh, if you didn't run into a dependency conflict, then that works too
Aru
Aru2mo ago
i had to manually compile because of a dependency conflict
zany130
zany130OP2mo ago
Worked fine for me but it was an older version from a few days ago I think
Aru
Aru2mo ago
version 0.35.4 has a bug fix so that custom capability maps can work but that was only a bugfix for devices inputPlumber already has configs for, so it probably won't be a problem for you since the flydigi is probably not already configured @zany130 one thing I do have a question about though, your controller has a switch mode with working gyro, no? If so, I think you can theoretically remap the Switch mode to a Dualsense for Gyro, and if there's a way to also capture the back paddles while in Switch mode, you can set Dualsense Edge instead for paddles + gyro
zany130
zany130OP2mo ago
Yeah it does have a working switch mode but 1. Triggers are sent as digtial so it's either fully pressed or not. 2. back buttons do not show up ony hid reading tools like evdev or anything like that so i don't think there exposed the gryo does work find out of the box though dinput mode is where the most things of the controller are exposed the only thing that might not be possible is 1. Circle button can't be remapped (the button next to home) is mapped to the anlong input of the right trigger (pressing the button registers as a 10% pull on the right trigger) it also triggers the flymouse (gyro mouse) of the controller 2. rumble is not exposed in dinput. this is also true on windows
Aru
Aru2mo ago
gotcha. well, sounds like a controller I won't pick up anytime soon lol. I hope it works out though, it'll be very interesting to see if this works well for external controllers if this can work for external controllers, then it'd open up the option of a lot of 3rd party controllers on Linux
zany130
zany130OP2mo ago
It's a really good controller if you can find it at a good price. Amazon is overcharging for importing it from china. You could git it directly from flydigi in china for about 80$ but that's on alibaba. I got it from alibaba with no issues but I heard horror stories about the customer support there.
Aru
Aru2mo ago
the available inputs and hardware seem nice, but unless it works well with Steam Input, it's no better than a dualsense or xbox imo which is why it'll be interesting to see if InputPlumber can solve the issue
zany130
zany130OP2mo ago
Yeah it theroticly should be possible to get the controller fully supported in steam input. I made a bug report about it https://GitHub.Com/libsdl-org/SDL/issues/10161 in dinput the controller is outputting all the nessicary data (execpt rumble and circle button) it just needs to be mapped and it's not that the back buttons don't work in xinput and switch mode it's just there not exposed to linux meaning you have to map them on the controller (this is where the built in screen comes into play but your limited to mapping the back buttons to existing gamepad inputs (abxy,start select ect you need steam input supoort or a input remapping software to map keyboard keys)
GitHub
Flydigi Apex 4 support · Issue #10161 · libsdl-org/SDL
as recommended here hhd-dev/hhd#73 (comment) it sounds like this would be the best place to get this supported? If not could you please point me in the right direction, I have no experience with th...
zany130
zany130OP2mo ago
From what I understand the problem with adding SDL support (and thus steam input) for dinput mode is gryo is dependent on either a mapping being set in the windows software OR gyro mouse being enabled with the circle button, and there is no way (at least no known way) of detecting if either are true. so I tried runnin input-remapper in desktop mode and looks like its no longer working input-remapper-gtk
input-remapper-gtk 2.0.1 https://github.com/sezanzeb/input-remapper
python-evdev 1.6.1
/usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d'
all_matches = list(re.finditer("(\d+, )+", string))
/usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d'
match = re.search(" copy *\d*$", name)
Done
Connected to the service
Loaded config from "/home/zany130/.config/input-remapper-2/config.json"
Traceback (most recent call last):
File "/usr/bin/input-remapper-gtk", line 95, in <module>
user_interface = UserInterface(message_broker, controller)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/inputremapper/gui/user_interface.py", line 106, in __init__
self._build_ui()
File "/usr/lib/python3.12/site-packages/inputremapper/gui/user_interface.py", line 130, in _build_ui
with open(get_data_path("style.css"), "r") as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/zany130/.local/share/input-remapper/style.css'
input-remapper-gtk 2.0.1 https://github.com/sezanzeb/input-remapper
python-evdev 1.6.1
/usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d'
all_matches = list(re.finditer("(\d+, )+", string))
/usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d'
match = re.search(" copy *\d*$", name)
Done
Connected to the service
Loaded config from "/home/zany130/.config/input-remapper-2/config.json"
Traceback (most recent call last):
File "/usr/bin/input-remapper-gtk", line 95, in <module>
user_interface = UserInterface(message_broker, controller)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/inputremapper/gui/user_interface.py", line 106, in __init__
self._build_ui()
File "/usr/lib/python3.12/site-packages/inputremapper/gui/user_interface.py", line 130, in _build_ui
with open(get_data_path("style.css"), "r") as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/zany130/.local/share/input-remapper/style.css'
Aru
Aru2mo ago
looks like it can't find a css file
zany130
zany130OP2mo ago
hmmm tried creating an empty file in that path (there was no style.css file) and now it gives
input-remapper-gtk ─╯
input-remapper-gtk 2.0.1 https://github.com/sezanzeb/input-remapper
python-evdev 1.6.1
/usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d'
all_matches = list(re.finditer("(\d+, )+", string))
/usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d'
match = re.search(" copy *\d*$", name)
Done
Connected to the service
Loaded config from "/home/zany130/.config/input-remapper-2/config.json"
Traceback (most recent call last):
File "/usr/bin/input-remapper-gtk", line 95, in <module>
user_interface = UserInterface(message_broker, controller)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/inputremapper/gui/user_interface.py", line 106, in __init__
self._build_ui()
File "/usr/lib/python3.12/site-packages/inputremapper/gui/user_interface.py", line 140, in _build_ui
self.builder.add_from_file(gladefile)
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/home/zany130/.local/share/input-remapper/input-remapper.glade”: No such file or directory (4)
input-remapper-gtk ─╯
input-remapper-gtk 2.0.1 https://github.com/sezanzeb/input-remapper
python-evdev 1.6.1
/usr/lib/python3.12/site-packages/inputremapper/gui/messages/message_data.py:45: SyntaxWarning: invalid escape sequence '\d'
all_matches = list(re.finditer("(\d+, )+", string))
/usr/lib/python3.12/site-packages/inputremapper/gui/controller.py:304: SyntaxWarning: invalid escape sequence '\d'
match = re.search(" copy *\d*$", name)
Done
Connected to the service
Loaded config from "/home/zany130/.config/input-remapper-2/config.json"
Traceback (most recent call last):
File "/usr/bin/input-remapper-gtk", line 95, in <module>
user_interface = UserInterface(message_broker, controller)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/inputremapper/gui/user_interface.py", line 106, in __init__
self._build_ui()
File "/usr/lib/python3.12/site-packages/inputremapper/gui/user_interface.py", line 140, in _build_ui
self.builder.add_from_file(gladefile)
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/home/zany130/.local/share/input-remapper/input-remapper.glade”: No such file or directory (4)
which is also not there ... but i never seen any of those files in there before....
Solution
zany130
zany1302mo ago
Just tried it again and input-remapper is working in gamemode not sure what changed:AkkoShrug: I think it was removing my user from the input group
Want results from more Discord servers?
Add your server