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

This branch is up to date with main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8ad02b3 Β· Jun 3, 2024

History

45 Commits
Jun 3, 2024
Jun 3, 2024
Jun 3, 2024
Mar 3, 2024
Feb 24, 2024
Mar 3, 2024
Mar 3, 2024
Feb 28, 2024
Feb 28, 2024
Feb 23, 2024
Jun 3, 2024
Feb 27, 2024
Feb 6, 2024
Jun 3, 2024

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