CapsNumTray itsnateai
winget install --id=itsnateai.CapsNumTray -e System tray indicators for Caps Lock, Num Lock, and Scroll Lock. Left-click to toggle, independent icons per key, light/dark theme support, DPI-aware, on-screen display.
winget install --id=itsnateai.CapsNumTray -e System tray indicators for Caps Lock, Num Lock, and Scroll Lock. Left-click to toggle, independent icons per key, light/dark theme support, DPI-aware, on-screen display.
LTR — Long-Term Release · one-click self-update built in.
Caps Lock, Num Lock, and Scroll Lock tray indicators for Windows.
A lightweight system tray utility that shows the current state of your lock keys as independent tray icons. Left-click to toggle, right-click for options. Bright icon = ON, dim icon = OFF.
| Tray Icons | Tray Menu | Settings |
|---|---|---|
![]() | ![]() |
Grab CapsNumTray.exe from the latest release — single file, self-contained, no .NET runtime needed.
CapsNumTray uses the SignPath Foundation for free code signing of open-source projects. Signed releases carry an Authenticode signature under the publisher name itsnateai and are verified by Windows before execution.
See Download above.
winget install itsnateai.CapsNumTray
winget upgrade itsnateai.CapsNumTray # later, to update
WinGet installs stay current automatically. The in-app Update button detects WinGet installs and points you back at winget upgrade instead of trying to overwrite the managed binary.
git clone https://github.com/itsnateai/CaplockNumlock.git
cd CaplockNumlock
# Framework-dependent (~155KB, requires .NET 8 runtime)
dotnet publish -c Release -r win-x64
# Self-contained single-file (~147MB, no runtime needed) — matches the release exe
dotnet publish -c Release --self-contained true -p:PublishSingleFile=true -r win-x64
Output: bin/Release/net8.0-windows/win-x64/publish/CapsNumTray.exe
Releases publish a SHA256SUMS file alongside the exe. The in-app Update button downloads it, verifies the hash, and fails closed if anything is missing or doesn't match.
Settings are stored in CapsNumTray.ini (auto-created next to the exe):
[Visibility]
ShowCaps=1
ShowNum=1
ShowScroll=0
[General]
ShowOSD=1
BeepOnToggle=0
| Key | Default | Description |
|---|---|---|
ShowCaps | 1 | Show Caps Lock tray icon |
ShowNum | 1 | Show Num Lock tray icon |
ShowScroll | 0 | Show Scroll Lock tray icon |
ShowOSD | 1 | Floating tooltip on toggle |
BeepOnToggle | 0 | Audible tone on toggle |
CapsNumTray uses the Win32 Shell_NotifyIconW API directly (not NotifyIcon) to support multiple independent tray icons. A 5-second polling timer via GetKeyState keeps icons in sync even when keys are toggled externally. Icons are DPI-aware via GetDpiForWindow and automatically re-added if Explorer restarts.
| Path | Description |
|---|---|
CapsNumTray.csproj | .NET 8 project file |
Program.cs | Entry point — single-instance enforcement |
TrayApplication.cs | Core app — Shell_NotifyIconW, WndProc, key toggling, menus |
IconManager.cs | DPI-aware icon loading with 3-stage fallback |
ConfigManager.cs | INI file reader/writer |
OsdForm.cs | Auto-hiding tooltip overlay |
SettingsForm.cs | Settings GUI |
HelpForm.cs | Help text window |
NativeMethods.cs | Win32 P/Invoke declarations |
StartupManager.cs | Startup shortcut management |
icons/*.ico | 9 icon files (ON/OFF/Light variants) |