Replies: 3 comments 9 replies
-
See #205, this might happen at some point In the 2.: Would be possible with a macro. For example mapping A to BTN_X: 4.: Can you give an example please? 6.:
Ah, so you looked into the code a bit?
Confirmed
Nice! :) If you want, you could continue the idea started here: 4b5b3fa (a commit of the
|
Beta Was this translation helpful? Give feedback.
-
So I did some more digging and testing. I have an Idea how we could go about implementing the uinput devices: I don't think the Currently This will not work for unified uinput devices for two reasons (I think):
|
Beta Was this translation helpful? Give feedback.
-
Do we have some well defined rules which key combinations should override other combinations when we have mapping keys like I am currently working on refactoring If you want to look at the current progress: https://github.com/jonasBoss/key-mapper/tree/refactored-injection In the end we should be able to map a joystick axis to a joystick axis and introduce an offset, expo, or any other transformation we can think of and all that on a mapping per mapping basis. |
Beta Was this translation helpful? Give feedback.
-
First of all, this is a great project which enabled me to actually use all the buttons I have on my mouse.
However I feel there is a lot of unused potential. Here is my proposal how we could vastly Improve the functionality:
1. Make the uinput devices independent from the original evdev device.
Currently each evdev device gets it's own uinput device for remapped buttons.
There is a lot of software, especially games, which don't play nice with multiple input devices. They also don't always handle hotplugging of devices.
Making the uinput independent would allow us to unify events from different inputs. We could for example combine joystick and keyboard inputs to create a single Gamepad. The uinput could be persistent, which means unplugging the joystick would not have any effect on the uinput-gamepad. Therefore software using the uinput never experiences hotplugging.
2. Provide a choice whether the original event gets suppressed. (on a per input device and/or event basis)
when mapping keyboard keys to gamepad buttons it might be no issue to let the original keyboard untouched or even a bad idea to have some keys missing because they got remapped to a gamepad.
3. Allow for multiple physical events to be mapped to the same uinput event.
A user might want different buttons to trigger the same event or action.
This should be rather easy for buttons, but could prove difficult for axis when handling multiple simultaneus inputs.
4. Allow a single physical event to be mapped to multiple uinput devices, and events.
I am not quite sure why but I can't really say why not. Surely someone will find a use for it. If it is not to difficult to implement.
5. Create sensible preset and user configured uinput devices (standard devices like keyboard, mouse, gamepad, ...)
We can not really control how the system handles a device (it seems to be mostly determined by the available events) so it is a good idea to provide working preset for standard devices. The user should still have the possibility to define his own Uinput devices.
6. Enabling and disabling the remapping on a per uinput device basis.
plugging a new device (group) in would remap all events which are preset to map on an Currently active uinput device.
This obviously would need a lot of work. From looking through the code for a few hours I would say we need a lot of new frontend code, while the backend (deamon) could be reused for the most part.
The preset files would need to include information on the mapping target. And we would need to store information for the available uinput devices.
I can totally understand If this is out of scope for this project. But I will gladly help where I can. If there is no time or interest to implement such features in here I will probably start working on a fork. I am always happy to get some feedback and advice on this Idea.
Beta Was this translation helpful? Give feedback.
All reactions