Controlling the Mouse via Keyboard for RSI
Introduction
In my experience, reaching for the mouse tends to trigger my (RSI), this presents a problem when using programs that don’t implement keyboard shortcuts. I took a look online and these are the tools I found that might help with this, I haven’t tried them yet, however, I’ll be sure to keep this updated as I do.
Background
Historically it seemed like software placed less emphasis on mouse interaction. Vim and Emacs instantly come to mind; but more generally programs that utilize traditional menu UI like LibreOffice would typically support keyboard accelerators 1 2, eliminating the mouse while simultaneously implemenging feature discover. Contemporary UI design, however, tends to favour of a more streamlined mobile-inspired design; Vala and Electron applications being prime examples 3 (exception for VScode).
Why Avoid the Mouse?
- It’s Slow!
- RSI Sucks I had a few bad falls at the skate park years ago, nowdays my elbows and wrist are a real week point for me. This only gets worse when I try to lift too much at the gym.
- Trackballs? Swapping to a trackball helped for some time and so did switching sides. Still, it didn’t take long for the problem to from from the elbow to the wrist.
Solutions
Testing this stuff can be a pain, because I have to use X11 on my desktop for CUDA 4 and choose to use Wayland on my laptop (I swear I get better battery life on wayland).
These are the tools I found:
X
Keynav
Based on my research, Keynav seems a favourable prospect. Once I get the opportunity to test it, I will provide an update.
Alternatives
-
Xdotool
This software can be bound to a configuration in platforms such as i3/dwm/xfce/etc.
-
Though I haven’t delved too deep into this, its functionalities appear quite similar to Xdotool.
Wayland
Warpd
Keynav is able to work with Wayland, even though it wasn’t primarily designed for it, see #54 5. There’s a Rust rewrite, Keynav-Wayland 6, however, the author recommends Warpd instead 7.
I haven’t tried Warpd, but it sounds good.
Apple Trackpad
I’ve just bought an Apple Magic Trackpad 2 8, I’m hoping it will be more ergonomic and hopefully by placing it on the left / alternatiting it, I won’t get as much strain.
It works on Gentoo (although not with my
Thinkpad
on Void), and it works over Bluetooth with bluetoothctl{.verbatim}
9, as a non-root user:
bluetoothctl
# Controller XX:XX:XX:XX:XX:XX BlueZ 5.70 [default]
[bluetooth]# list
[bluetooth]# show XX:XX:XX:XX:XX:XX
[bluetooth]# select XX:XX:XX:XX:XX:XX
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# discoverable on
[bluetooth]# pairable on
[bluetooth]# scan on
[bluetooth]# devices
# Device YY:YY:YY:YY:YY:YY WH-1000XM4
# Device ZZ:ZZ:ZZ:ZZ:ZZ:ZZ Magic Trackpad
[bluetooth]# pair ZZ:ZZ:ZZ:ZZ:ZZ:ZZ
[bluetooth]# trust ZZ:ZZ:ZZ:ZZ:ZZ:ZZ
[bluetooth]# connect ZZ:ZZ:ZZ:ZZ:ZZ:ZZI couldn’t get blueman working, but this is fine and I can throw it in
my .xinitrc{.verbatim} or a cronjob with @reboot{.verbatim}.
Conclusions
I haven’t tried these yet, but I’ll make sure to update here as I go along. So far I’m pretty happy with the Apple trackpad but I’m hoping to investigate keynav as well.
Footnotes
Footnotes
-
About Keyboard Accelerators - Win32 apps | Microsoft Learn ↩
-
Make. It. Simple. Linux Desktop Usability --- Part 1 | by probono | Medium referenced in Reviewer Guide --- helloSystem documentation ↩
-
Generally, see Nvidia in swaywm/sway/issues ↩
-
jordansissel/keynav#54 Wayland support: rectangles are not transparent ↩
-
GitHub - rvaiya/warpd: A modal keyboard-driven virtual pointer ↩