You are not logged in.

#1 2024-07-21 12:41:40

maziar
Member
Registered: 2022-08-28
Posts: 55

[closed] support mouse + keyboard combination remapping in Wayland

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

#2 2024-07-22 12:08:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,174

Re: [closed] support mouse + keyboard combination remapping in Wayland

There's no "Wayland" there are specific compositors and it depends on the compositor you're using as to which mechanism it uses

Offline

#3 2024-07-22 12:33:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [closed] support mouse + keyboard combination remapping in Wayland

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

#4 2024-07-22 16:15:58

maziar
Member
Registered: 2022-08-28
Posts: 55

Re: [closed] support mouse + keyboard combination remapping in Wayland

Trilby wrote:

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

#5 2024-07-22 16:36:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [closed] support mouse + keyboard combination remapping in Wayland

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

#6 2024-07-23 07:47:06

maziar
Member
Registered: 2022-08-28
Posts: 55

Re: [closed] support mouse + keyboard combination remapping in Wayland

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

#7 2024-07-23 13:09:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [closed] support mouse + keyboard combination remapping in Wayland

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

#8 2024-07-24 07:55:45

maziar
Member
Registered: 2022-08-28
Posts: 55

Re: [closed] support mouse + keyboard combination remapping in Wayland

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

#9 2024-07-24 12:34:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [closed] support mouse + keyboard combination remapping in Wayland

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

#10 2024-07-24 14:12:11

maziar
Member
Registered: 2022-08-28
Posts: 55

Re: [closed] support mouse + keyboard combination remapping in Wayland

Offline

#11 2024-07-24 16:31:05

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,399
Website

Re: [closed] support mouse + keyboard combination remapping in Wayland

In that case please mark your thread as [solved], not [closed].

https://wiki.archlinux.org/title/Genera … ow_to_post


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

Board footer

Powered by FluxBB