English | 简体中文
A tiny always-on-top toggle for Windows. Press Win+T to pin or unpin the active window. Single C file, no dependencies beyond Win32, ~130 KB exe.
⬇ Download the latest installer
- Win+T toggles always-on-top for the foreground window
- Audio feedback: hardware-connect sound = pinned, disconnect sound = unpinned, ding = can't pin (e.g. elevated windows blocked by UIPI)
- System tray icon with right-click menu: run at startup, language (English / 简体中文), about, exit
- All pinned windows are automatically restored when TopPin exits
- Single instance; survives Explorer restarts (tray icon re-adds itself)
- Excludes the desktop and taskbar from pinning
The exe and installer are not code-signed, and TopPin uses a low-level keyboard hook (to intercept Win+T), so Windows SmartScreen or antivirus software may show a warning when downloading or running it. This is a false positive — the full source is in this repo and you can build it yourself. You can safely ignore the warning and continue: in SmartScreen click More info → Run anyway.
Explorer already registers Win+T (focus taskbar) via RegisterHotKey, so a plain hotkey registration fails. TopPin installs a WH_KEYBOARD_LL hook, which runs before hotkey dispatch, swallows the combo, and injects a dummy keystroke so releasing Win afterwards doesn't open the Start menu. Note that while TopPin is running, the original "focus taskbar" function of Win+T is unavailable.
Requires Visual Studio 2022 Build Tools (MSVC + Windows SDK):
build.batThis compiles the resources (toppin.rc) and toppin.c into TopPin.exe.
The Inno Setup script toppin.iss builds a per-user installer (no UAC) with English and Simplified Chinese, sets autostart, and launches TopPin after install:
iscc toppin.issOutput lands in dist\TopPin-Setup-<version>.exe.
Stored under HKCU\Software\TopPin (Language, FirstRunDone); autostart uses the standard HKCU\...\CurrentVersion\Run key. First run enables autostart by default — turn it off from the tray menu.
| File | Purpose |
|---|---|
toppin.c |
The whole application |
toppin.rc / toppin.ico |
Icon resource |
build.bat |
MSVC build script |
toppin.iss / ChineseSimplified.isl |
Inno Setup installer |
make_icon.py |
Generates toppin.ico |
audition_sounds.py |
Preview Windows sounds used for feedback |
verify.py |
Post-build sanity checks |
MIT