Is it possible to change mouse to left/right handed mode via CLI on wayland?

shadowintheday2@lemmy.world to Linux@lemmy.ml – 23 points –

On X I use

xmodmap -e "pointer = 3 2 1" // lefthand
xmodmap -e "pointer = 1 2 3" //righthand

On wayland/KDE, I must change it manually via system settings; and any other application that run on xwayland doesn't respect this

is it possible to change everything via cli, for both wayland and xwayland?

please help an old and tired boomer that is trying to stick with wayland and nvidia this time

2

For KDE specifically I think there's a dbus interface that can be called to switch it. You can find it with QDBusViewer or D-Feet.

I'd imagine XWayland would follow the same since it's essentially a Wayland client. But if you ran the xmodmap under xwayland, that may have inverted it in xwayland, and it's already inverted in KWin which would double invert it aka put it back to default.

Otherwise doing it at the evdev level will definitely work. It's a bit of a nuclear option but if it works...