This repository contains shift-tutor, a small Python script that filters suboptimal shift key combinations, on Linux.
That way it helps to train muscle memory for using both shift keys when touch typing.
It might also serve as a concise example of how keyboard events can be easily read, filtered, manipulated and injected on Linux.
See also my blog article on shift-tutor.
2023, Georg Sauthoff
On Fedora, install dependencies:
dnf install python3-evdev
List all available keyboards:
shift-tutor.py -l
Actively filter a certain keyboard:
shift-tutor.py /dev/...
Or by name:
shift-tutor.py --name 'Some Keyboard Name'
Note that the script requires root privileges.
It uses the Linux evdev API to exclusively grab a keyboard and inject a subset of the arriving keycodes back to the system, using the Linux uinput API, via a virtual keyboard.
For accessing these APIs from Python, shift-tutor uses the fine python-evdev package.