Skip to content

Filter suboptimal shift key combinations on Linux

Notifications You must be signed in to change notification settings

gsauthof/shift-tutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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

Usage

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.

How it works

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.

About

Filter suboptimal shift key combinations on Linux

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages