Skip to content

Service that detects words like hELLO, toggled caps lock and retype the word

License

Notifications You must be signed in to change notification settings

ad2ien/caps-lock-auto-switch

Repository files navigation

Caps Lock Auto Switch

Rust Debian GitHub Release Status GitHub Build Lint Status License Gitmoji

Use case : as any boomer, I sometimes type while looking at the keyboard. And I end up starting sentences having the case all wrong.

This small service listens to keyboard events and detects words like hELLO . Then the caps lock is toggled and the word is retyped.

This package is written in Rust and uses rdev crate. It won't work with Wayland windowing system.

Warning

🚧 Debian package under construction

Install

Run the following commands to install the package:

VERSION=$(curl "https://api.github.com/repos/ad2ien/caps-lock-auto-switch/tags" | jq -r '.[0].name')
curl -L "https://github.com/ad2ien/caps-lock-auto-switch/releases/download/${VERSION}/capslock-auto-switch_${VERSION#v}-1_all.deb -o capslock-auto-switch_${VERSION#v}-1_all.deb"
sudo dpkg -i capslock-auto-switch_${VERSION#v}-1_all.deb
rm capslock-auto-switch_${VERSION#v}-1_all.deb

Dev

Pre requisites:

sudo apt-get install libx11-dev xorg-dev libxdo-dev

Run:

cargo run

Build debian package

./debian-build.sh --lint 

Off course lint arg is optional

Test

Only tried on Pop!_OS 22.04 LTS. Should work on any Debian based distri with X11.

TODO

  • debian package lint warnings
  • remove test from build script
  • readme badges rust & lint
  • commands : help, edit configuration...
  • check install/remove, upgrade on a clean system
  • only define project variable once : description licence version..
  • manage languages special characters
  • dockerize build
  • logs
  • docker image project for dch
  • Have a debian repository to enable apt-get install capslock-auto-switch

About

Service that detects words like hELLO, toggled caps lock and retype the word

Resources

License

Stars

Watchers

Forks