https://github.com/halfzebra/rust-win-keyboard-experiment
A program that keeps your keyboard language in check by binding it to specific applications.
https://github.com/halfzebra/rust-win-keyboard-experiment
keyboard-layout rust win-api
Last synced: 2 months ago
JSON representation
A program that keeps your keyboard language in check by binding it to specific applications.
- Host: GitHub
- URL: https://github.com/halfzebra/rust-win-keyboard-experiment
- Owner: halfzebra
- Created: 2022-02-23T00:02:19.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-27T13:47:21.000Z (over 2 years ago)
- Last Synced: 2025-01-20T10:14:04.001Z (about 1 year ago)
- Topics: keyboard-layout, rust, win-api
- Language: Rust
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ⌨ Rust Windows Keyboard Experiment
This program is designed to automatically switch your keyboard layout based on the application you are currently using. By providing a configuration file in YAML format, you can specify which keyboard layout should be used for each application. The program will continuously monitor your active window and switch the layout accordingly. This can save you time and effort by eliminating the need to manually switch your layout every time you switch between different applications. Additionally, it can be useful for users who frequently switch between languages and want to avoid accidentally typing in the wrong one.
## Running Locally
Create a config file with language code to app mapping.
```yaml
en-US:
- Code.exe
- steam.exe
- HuntGame.exe
- ubuntu2004.exe
uk-UA:
- Discord.exe
- Telegram.exe
```
Compile the binary or run directly from source:
```bash
cargo run .\mocks\lang.yml
```
## Useful Links
- https://docs.microsoft.com/en-us/windows/win32/intl/language-identifiers
- https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf
- https://microsoft.github.io/windows-docs-rs/doc/windows/
- https://stackoverflow.com/questions/51117874/how-to-send-wm-inputlangchangerequest-to-app-with-modal-window