customization of key-bindings #60
-
Hey! First off, I really want to thank you for your amazing work. The driver works really well! It wouldn't be a problem, if a possible solution was a bit more "technical". :D I would really appreciate your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi @Trimarix, thanks! :-) Yes it is possible to remap keys, either using Eruption or via the layers in the Linux input stack that sit above Eruption. You may want to have a look at this if you are on Xorg: https://medium.com/@sean.nicholas/how-i-remapped-my-keyboard-to-have-a-better-developer-experience-1323424c62b8. The previous example uses xinput, which may be considered as deprecated. It will probably be replaced by libinput/Wayland in the future. If you are on a libinput based input stack, then this could be useful too: The Linux input stack, using Eruption and Wayland/modern Xorg libinput
Remap keys using EruptionThe input subsystem inside Eruption supports calling Lua macros as soon as a Linux evdev or USB HID event is emitted by the kernel. Please have a look at So on my REMAPPING_TABLE[38] = 44 -- Remap: 'z' => 'y' Since Eruption is placed at a very low level of the input stack and translation of keyboard layouts happens on the layer above, it depends on the current active keyboard layout, which character an application will finally receive. To inject We would need a mechanism like this: MACRO_TABLE[key_name_to_index("+")] = inject_curly_bracket_lua_fn -- inject 'AltGr' + '7' Key repetition would need to be taken care of too, I suppose. I will look into implementing something like this. |
Beta Was this translation helpful? Give feedback.
Hi @Trimarix, thanks! :-)
Yes it is possible to remap keys, either using Eruption or via the layers in the Linux input stack that sit above Eruption. You may want to have a look at this if you are on Xorg: https://medium.com/@sean.nicholas/how-i-remapped-my-keyboard-to-have-a-better-developer-experience-1323424c62b8. The previous example uses xinput, which may be considered as deprecated. It will probably be replaced by libinput/Wayland in the future.
If you are on a libinput based input stack, then this could be useful too:
The Linux input stack, using Eruption and Wayland/modern Xorg libinput