You are not logged in.
Hi
What libs currently support mouse + keyboard combination remapping in Wayland?
especially when the mouse & keyboard is a different device
I read this: https://wiki.archlinux.org/title/Input_remap_utilities
but are no clear Documentation in each Utilitie or examples to support this
have any experience with this?
Last edited by maziar (2024-07-24 14:13:36)
Offline
There's no "Wayland" there are specific compositors and it depends on the compositor you're using as to which mechanism it uses
Offline
Wayland doesn't handle or process input itself. Currently implementations rely on libxkb for keyboards and libinput for mouse / pointers.
For keyboards, you're in luck: all libxkb settings can be set via environment variables that any compositor will inherit. So just follow guides for creating custom keymaps for libxkb. This doesn't depend on the compositor at all.
For mouse settings, despite being fully handled by libinput, libinput doesn't have any external configuration and all configuration options must pass through the compositor to libinput. And the exact way to specify libinput settings differs between compositors.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Wayland doesn't handle or process input itself. Currently implementations rely on libxkb for keyboards and libinput for mouse / pointers.
For keyboards, you're in luck: all libxkb settings can be set via environment variables that any compositor will inherit. So just follow guides for creating custom keymaps for libxkb. This doesn't depend on the compositor at all.
For mouse settings, despite being fully handled by libinput, libinput doesn't have any external configuration and all configuration options must pass through the compositor to libinput. And the exact way to specify libinput settings differs between compositors.
Yes
Wayland does it yourself, but many tools such as https://wiki.archlinux.org/title/Input_remap_utilities don't help ?
if yes then have experience with up or similar libs for this job?
Last edited by maziar (2024-07-22 16:16:19)
Offline
What is your goal? I just looked at that list, and the first one said as an example it can remap Caps to Escape, which is just silly: you don't need a tool for that, just "export XKB_DEFAULT_OPTIONS=caps:escape" in your profile or other startup file(s) before the compositor starts. This works for X11 and Wayland (or anything else that uses libxkb).
In otherwords: for keyboard settings, no tools are needed, for mouse settings, no tools are possible. So I'm not sure what "tools" you'd be looking for.
Last edited by Trilby (2024-07-22 16:59:54)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
As written in the first topic: mouse + keyboard combination (when kb & mouse is a different device) remapping in Wayland
then cif can not Wayland directly support "combination remapping" any tools do it such as utility listed in link Input_remap_utilities
Offline
And what are you trying to "remap". Simply restating the vague question still in vague terms does not help us get closer to a solution. What keys do you want to change and what do you want to change them to? What do you want to change about mouse axes or buttons?
Again, the only general answer is to use XKB settings for keyboards and your own compositors settings for mouse settings. So what do you want to remap and what compositor are you using??
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
define some comlex jobs
left_ctrl + extra_mouse_2 -> cltr+ shift + F11
left_ctrl + shift + mouse_scroll_UP -> cltr+ shift + F10
left_ctrl + shift + mouse_scroll_DOWN -> cltr+ shift + F9
Offline
Well this is an X-Y problem. What are Ctrl+Shift_F## supposed to do?
Presumably those are bound to some action in your compositor, so you should just bind your preferred combination to those actions in your compositor configuration ... whichever one that is. You were implicitly asked twice, and the quite explicitly once, and yet you refuse to share this information. So I give up. Good luck.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I do this job by using https://github.com/sezanzeb/input-remapper
Offline
In that case please mark your thread as [solved], not [closed].
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline