Easy mouse settings changing from right- to left-handed
Juraj Oravec
jurajoravec at mailo.com
Sat Feb 18 13:37:33 GMT 2023
On sobota 18. februára 2023 13:09:22 CET Tobias Leupold wrote:
> Hi all!
>
> My little son starts to use a computer for school, so I currently
> share my notebook with him. He's left-handed (and I'm right-handed),
> so I searched for a convenient way to switch the mouse settings from
> right-handed to left-handed and vice versa, like with a small systray
> icon and just one click to do.
>
> The only thing I found was "mouseswap-kf5" (
> https://www.pling.com/p/998954/ ) which seems to do this exact thing.
> But it seems to be outdated and unmaintained -- I could not build it.
>
> I then looked into the sources and thought it could not be that hard
> to re- write or update the thing, but after messing a bit with it, I
> have to admit that I have no idea how to do it properly ;-) I could
> not even connect to some DBUS signal telling me that any
> systemsettings setting has been changed (I never worked with this
> before) ...
>
> So: Is there anything comparable we have in "official" KDE? And if
> not, can anybody point me to docs about how to do it, so that I can
> try to implement this myself?
>
> This would imo be a nice addition to the default mouse system
> settings, like "show a systray icon to switch between left- and
> right-handed" or such. I think this would be a nice extra for a lot
> of people sharing their computer with others.
>
> Thanks for all help and all hints :-)
>
> Cheers, Tobias
Hello Tobias,
Have you considered using libinput and undex Xorg xinput tool and some
scripts around (create script and bind to keyboard shortcut, create some
icon...)?
Example from my machine (mouse can have multiple entries here):
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Razer Razer Basilisk V3 id=17 [slave pointer (2)]
$ xinput --list-props 17
Device 'Razer Razer Basilisk V3':
.....
libinput Left Handed Enabled (294): 0
libinput Left Handed Enabled Default (295): 0
...
Probably:
$ xinput --set-prop 17 "libinput Left Handed Enabled" 1
Good luck,
Juraj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20230218/e03f459a/attachment.sig>
More information about the kde-devel
mailing list