| Crates.io | keyswitch |
| lib.rs | keyswitch |
| version | 0.1.2 |
| created_at | 2025-10-12 21:19:09.600293+00 |
| updated_at | 2025-10-12 23:26:26.47584+00 |
| description | Lightweight keyboard layout switcher and shortcut manager for MacOS |
| homepage | |
| repository | https://github.com/divi255/keyswitch |
| max_upload_size | |
| id | 1879725 |
| size | 56,010 |
Lightweight keyboard layout switcher and shortcut manager for MacOS.
Switches keyboard layouts with a single keypress INSTANTLY
Written in Rust - small and fast
Optionally, allows to run custom commands with key combinations
cargo install keyswitch
(you may still need a symlink to ~/.cargo/bin/keyswitch to see it in Finder
for Input Monitoring permission)
Download a pre-built binary from Releases section and place it e.g. to ~/bin.
Run keyswitch setup
All instructions are printed in the terminal, but just in case:
It will create a configuration file at ~/.config/keyswitch/config.toml
Add the binary path in System Preferences -> Privacy & Security -> Input Monitoring
Use keyswitch edit-config to open the configuration file in the default terminal
editor. Or edit ~/.config/keyswitch/config.toml manually
To get key codes and modifiers, run keyswitch sniff, important: the terminal
app must also have Input Monitoring permission (at least until the setup is
over)
Start keyswitch in the terminal to ensure it works
Run launchctl load /Users/gigabito/Library/LaunchAgents/ai.bma.keyswitch.plist to
start it in background and have it started on login
Replace the binary
Remove and add again the Input Monitoring permission
Some keys do not report scan codes via CGEventTap, use Karabiner Elements to remap them to something
weird and never exists, e.g. F19
Ensure there are no key combinations conflicting with other apps
~/Library/LaunchAgents/ai.bma.keyswitch.plist:<key>StandardOutPath</key>
<string>/tmp/keyswitch.out</string>
<key>StandardErrorPath</key>
<string>/tmp/keyswitch.err</string>
launchctl unload ~/Library/LaunchAgents/ai.bma.keyswitch.plist
launchctl load ~/Library/LaunchAgents/ai.bma.keyswitch.plist
/tmp/keyswitch.out and /tmp/keyswitch.err for errors