Turn Caps Lock into a keyboard layer. Arrows, editing, modifiers and media on the home row, on Windows, macOS and Linux.
Windows · macOS Apple Silicon / Intel · Linux
Hold Caps Lock and press a bound key. Caps Lock itself never toggles while nocaps is enabled.
| Hold Caps Lock + | Does | Hold Caps Lock + | Does | |
|---|---|---|---|---|
| I J K L | ↑ ← ↓ → | A / S / D / F + a movement key | Word jump / Select / Workspace / Window focus | |
| H / ; | Home / End | Q / W / Tab | Volume down / up / mute | |
| U / O | Backspace / Delete | E / R / T | Previous / play-pause / next |
Combine freely: Caps Lock + A + J jumps a word left, and adding S selects it. Combos do the same thing on every OS: on macOS words use Option and Home/End become Cmd+←/→. Caps Lock + D + J/L switches workspace left/right with each OS's own shortcut: Ctrl+Alt+←/→ on Linux, Control+←/→ (Mission Control Spaces) on macOS, Ctrl+Win+←/→ on Windows. On GNOME, adding S takes the focused window with you. On Linux, Caps Lock + F + IJKL sends Super+Ctrl+Alt+arrow for a tiling extension's directional focus (for GNOME's Tiling Shell, bind focus-window-left/right/up/down to it).
nocaps runs in the system tray. Choose Configure to rebind: click a key, press the new one, and it is applied and saved instantly.
| Windows | Run nocaps-windows.exe. To start at sign-in, put it in shell:startup. |
| macOS | chmod +x nocaps-macos-* && xattr -d com.apple.quarantine nocaps-macos-*, run it, then allow it under System Settings → Privacy & Security → Accessibility. |
| Linux | Needs read access to /dev/input and write access to /dev/uinput: sudo usermod -aG input "$USER", then sign out and back in. Keyboards plugged in later (or reconnected through a dock) are picked up automatically. nocaps adds itself to the app grid; launching it again opens the running copy's window. |
Every platform uses its lowest-level input interface short of a kernel driver: a WH_KEYBOARD_LL hook on Windows, a Core Graphics event tap on macOS, and evdev/uinput on Linux. Bindings live in a static table, so each key event costs one memory load: no locks, allocation or lookups. The window does no work while it sits in the tray.
Configuration file
Changes made in the window are saved as JSON:
- Windows:
%APPDATA%\nocaps\config.json - macOS:
~/Library/Application Support/nocaps/config.json - Linux:
~/.config/nocaps/config.json
{
"version": 1,
"enabled": true,
"bindings": { "arrow_up": "i", "left_control": "a", "volume_mute": "tab" }
}Each action takes one key and each key triggers one action. Defaults are compiled in from config/default.json.
macOS and Caps Lock
macOS latches Caps Lock in its HID driver, below any app, so nocaps uses hidutil to remap Caps Lock to F18 while enabled. Disabling or quitting restores your previous mapping. If nocaps is force-killed, Caps Lock acts as F18 until nocaps is next run or the Mac restarts.
Building from source
cargo build --releaseLinux also needs libgtk-3-dev libayatana-appindicator3-dev.
MIT. Icon cap from Twemoji (CC-BY 4.0); interface font Inter (SIL OFL 1.1).