| Crates.io | ccaps |
| lib.rs | ccaps |
| version | 0.7.1 |
| created_at | 2025-11-17 09:20:05.028368+00 |
| updated_at | 2025-11-22 12:53:22.507013+00 |
| description | A lightweight Windows keyboard layout switcher that repurposes the Caps Lock key for quick layout switching |
| homepage | https://github.com/holgertkey/ccaps |
| repository | https://github.com/holgertkey/ccaps |
| max_upload_size | |
| id | 1936492 |
| size | 100,228 |
A lightweight Windows keyboard layout switcher that repurposes the Caps Lock key for quick layout switching with country-specific filtering and configuration persistence.
cargo install ccaps
This will download, compile, and install the latest version of CCaps. The executable will be placed in your Cargo bin directory (usually ~/.cargo/bin/ or %USERPROFILE%\.cargo\bin\).
ccaps.exe to any folder (e.g., C:\Program Files\CCaps\)# Basic commands
ccaps # Show interactive menu
ccaps -run # Run in foreground mode (all layouts)
ccaps -start # Start in background with all layouts + add to auto-startup
ccaps -start -de # Start in background with English/German + add to auto-startup
ccaps -stop # Stop background process + remove from startup + delete config
ccaps -exit # Stop background process only
ccaps -status # Show status and available language codes
ccaps -help # Show help information
ccaps -v # Show version information
# Country-specific switching
ccaps -run -de # English ↔ German switching
ccaps -run -de -fr # German ↔ French switching (no English)
Use ccaps -status to see all available language codes for your system. Common codes include:
| Code | Language | Code | Language | Code | Language |
|---|---|---|---|---|---|
us |
English (US) | ru |
Russian | ua |
Ukrainian |
gb |
English (UK) | de |
German | fr |
French |
es |
Spanish | it |
Italian | pl |
Polish |
pt |
Portuguese | nl |
Dutch | cz |
Czech |
jp |
Japanese | kr |
Korean | cn |
Chinese |
| Key Combination | Action |
|---|---|
Caps Lock |
Switch to next keyboard layout |
Alt + Caps Lock |
Toggle Caps Lock on/off |
The Scroll Lock LED on your keyboard serves as a layout indicator:
ccaps
Shows a menu with all available options and current system status.
Available commands in interactive mode:
run - Run in foreground mode (all layouts)run -de - Run with specific layouts (e.g., English ↔ German)start - Start in background with all layouts and add to auto-startupstart -de - Start in background with specific layouts and auto-startupstop - Stop background process and remove from startupexit - Stop background process onlystatus - Show current status and available language codeshelp - Show detailed helpmenu - Show menu againquit or q - Exit interactive menuccaps -run -de
ccaps -run -de -fr -es # German ↔ French ↔ Spanish
ccaps -start -de
ccaps -start
ccaps -status
Output example:
CCaps Layout Switcher Status:
╞══════════════════════════════════════════════════════════════╡
Background process: RUNNING ✓
Auto-startup: ENABLED ✓
Startup command: "C:\Program Files\CCaps\ccaps.exe" --background -de
Configuration file: EXISTS ✓
Config path: C:\Program Files\CCaps\ccaps-config.json
Saved country codes: de
Available keyboard layouts:
┌─────┬──────────────────────────────────────┬─────────────────┐
│ Code│ Language │ Status │
├─────┼──────────────────────────────────────┼─────────────────┤
│ -us │ English (United States) │ CURRENT ✓ │
│ -ru │ Russian │ Available │
│ -ua │ Ukrainian │ Available │
│ -de │ German │ Available │
└─────┴──────────────────────────────────────┴─────────────────┘
Usage examples:
ccaps -run # Run in foreground mode (cycle through all layouts)
ccaps -run -de # Switch between English and German
ccaps -start # Start with all layouts and add to auto-startup
ccaps -start -de # Start with English/German and add to auto-startup
Status: All systems operational ✓
CCaps automatically saves your layout preferences when using -start with country codes:
ccaps-config.json (stored in %LOCALAPPDATA%\CCaps\)C:\Users\<username>\AppData\Local\CCaps\ccaps-config.jsonExample configuration file:
{
"country_codes": ["de"],
"version": "0.7.1"
}
ccaps -start -de saves English/German preferenceccaps -stop removes configuration fileccaps -status shows current configurationCCaps uses Windows low-level keyboard hooks to intercept Caps Lock key presses and redirect them to layout switching functionality. The program:
The layout detection works with all Windows keyboard layouts. The program automatically detects over 40 languages including:
# Start with specific layouts and auto-startup
ccaps -start -de # English/German switching
ccaps -start -de -fr # German/French switching
ccaps -start # All layouts (default)
# The configuration is automatically saved and restored
ccaps
# Choose from menu:
# start -de # This saves the preference and starts background process
# run -de # This only runs temporarily without saving
# q # Quick exit from interactive menu
The program stores startup configuration in:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Key: "CCaps Layout Switcher"
Value: "C:\Program Files\CCaps\ccaps.exe" --background -de
ccaps -status
Shows:
git clone https://github.com/holgertkey/ccaps.git
cd ccaps
cargo build --release
The executable will be created at target/release/ccaps.exe.
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run%LOCALAPPDATA%\CCaps\ccaps -run -zz
# Error: Unknown country codes: zz. Use 'ccaps -status' to see available codes.
Solution: Run ccaps -status to see all available country codes for your system.
# Check status
ccaps -status
# Restart and re-enable startup
ccaps -stop
ccaps -start -de # or your preferred layout codes
ccaps -statusccaps -exit then ccaps -startccaps -stop then ccaps -start -deccaps -status# Stop the program and remove all traces
ccaps -stop
# Delete the executable file
del ccaps.exe
# Configuration file is automatically deleted by 'ccaps -stop'
This project is licensed under the MIT License - see the LICENSE file for details.
-exit and -stop commands to prevent accidental termination-start command to detect existing auto-startup entries-start (shows "Updating configuration..." vs "Added to startup")%LOCALAPPDATA%\CCaps\ccaps-config.json)-start command (now uses CREATE_NO_WINDOW flag)q command as a shortcut for quit in interactive menu-start command to accept country codesstart command with country codes-stop command