How it works
- The panel. It is built once and never hidden between uses: Windows keeps it off the screen (cloaked) while it stays drawn, and after every copy its list is updated in the background. Win+V moves the finished panel to your cursor and puts it on screen in one step, with no fade or slide. On a test machine without a graphics card, the panel was complete about 0.1 s after the key, against 0.6 s before this change.
- Start-up. BetterClipboard ships precompiled (ReadyToRun), so none of its code is compiled while you wait. On a test machine without a graphics card, Settings opened in 0.6 s instead of 1.2 s, and the first Win+V after a start took 0.09 s instead of 0.21 s.
- Memory. A little while after you put the panel away or close Settings (never while either shows), BetterClipboard frees the memory it no longer uses. It keeps the pages the panel needs: handing them back to Windows made a Win+V after a pause wait for them, up to half a second on a PC short of memory. Pictures are decoded at the size they are drawn, and a decoded full-size picture is let go when the panel closes. Settings leaves caches behind that only a new process gives back, so a few seconds after it closes, BetterClipboard starts a fresh copy of itself: the new copy holds the shortcuts and takes over the tray icon before the old one exits, and reads any copy made in between. On a test machine without a graphics card, it needed about 53 MB of private memory at rest after a start (87 MB in 0.2.10), and Task Manager's Memory column showed 32 to 52 MB.
- Capture. BetterClipboard listens with
AddClipboardFormatListener— the same change notification Windows' own clipboard-history service uses (there is no "atomic, never miss" clipboard API in Windows; every consumer reads the clipboard right after being told it changed). It reads each change immediately on a high-priority thread.- What was measured: copies 2 ms apart or more are all captured, and at 1 ms nearly all. A program that copies in a tight loop overwrites its intermediate copies before anyone, Win+V included, can read them.
- What happens then: BetterClipboard still gets the last copy and keeps an exact tally of the overwritten ones, shown in Settings › Capture reliability.
- Safety net: a watchdog re-arms the listener if Windows ever stops delivering.
- Privacy markers. Copies flagged by apps as private (
ExcludeClipboardContentFromMonitorProcessing,CanIncludeInClipboardHistory = 0,Clipboard Viewer Ignore— used by password managers) are never recorded. Many managers, Electron-based ones especially, don't set these flags. The ignored-apps list catches those by the name of the process that made the copy. - Other sources. Each tab for another app watches its source in the cheapest way that still sees every
change:
- screenshot folders: a folder watcher;
- the Win+R list: a registry change notification;
- the agents' history files: a reader that keeps a checkpoint per file and reads only the bytes added since. A folder watcher alone is not enough: Windows reports no writes to a file that another app keeps open, so a short check every 5 seconds backs it up;
- Notepad++'s unsaved tabs: a folder watcher on its backup folder; a tab is read only once it rests for a minute;
- files opened in Notepad++: a notification when its window title changes, and every 5 seconds one question for how many documents it has open; BetterClipboard asks which ones only when the title or the count changed;
- PowerShell's history file and Everything's list of opened files: read only when you open their tab;
- Command Prompt windows: read by a short-lived helper process, so that a window that closes during the read can never take BetterClipboard down with it.
- Forget forever. Everything that would be stored — live copies, screenshots, Win+R commands, kept commands
and prompts,
bclip put, the Windows import — is checked against the forget list before anything is written. Text is fingerprinted after unifying line endings and trimming surrounding whitespace, pictures by their decoded pixels, file lists by their paths. While the list is empty, nothing is even hashed. The list lives in the encrypted database, not insettings.json: a bare hash of a short password could be guessed offline. - Storage. One SQLite database, fully encrypted with SQLite3 Multiple Ciphers (ChaCha20-Poly1305: every page, the write-ahead log, the full-text index, thumbnails and the prompt archive). Search uses an FTS5 trigram index on the decrypted pages in memory.
- The key. A random 256-bit key, stored only sealed with Windows DPAPI for your account, with extra
entropy derived (HKDF-SHA256) from this PC's
MachineGuidand your account's SID. The history folder name is a UUIDv5 computed from the same binding. Result: the history opens only for BetterClipboard, on this Windows installation, signed in as you. It protects the data at rest — stolen disks, backups, other accounts — but, like every DPAPI-based app, not against malware already running as you. A history that can no longer be decrypted (e.g. after reinstalling Windows) is set aside, never deleted. - Updates. The check reads GitHub's release list and keeps a copy with its entity tag, so an unchanged list
costs one "not modified" answer a day. A failed check is tried again after 1, 2, 4 … hours, and never before a
rate limit ends. An approved update is downloaded only from this repository's release downloads, and its
SHA-256 must equal both the release's
SHA256SUMS.txtand the digest GitHub computed at upload. A running program cannot replace its own folder, so the app takesinstall.ps1out of the verified package and runs it with Windows PowerShell, without a window: it checks the package once more, asks BetterClipboard to close (queued copies are saved first), swaps the folder by renames — a failed swap puts the old folder back — and starts the app again. It writes its outcome to a file, which the app reads at its next start to tell you how it went. Only the install folder is touched. A copy extracted from the zip is updated by the new version's own program instead, started from the unpacked package: it asks BetterClipboard to close, renames each of the release's files aside and copies the new one in its place (a file that cannot be replaced puts every file back), writes the same outcome file and starts the app again from the same folder. - Languages. Each interface language is one catalog embedded in the program, with its flag, so one build holds
every language and no copy can miss a language file. Strings are found by their English text, counts take the form
each language needs (CLDR's plural rules), and a string a translation lacks shows in English; a language is offered
once nearly all of it is translated. Every English string carries a description for translators. A right-to-left
language keeps the left-to-right layout, and its text is embedded right to left so each sentence reads in its own
order. Logs and
bclip's output stay English. See docs/localization.md.
Data lives in %LOCALAPPDATA%\BetterClipboard (stores\<id>\history.db + history.key, settings.json,
logs\, updates\), for every kind of install, the Microsoft Store edition included (where Windows does not let it
write that folder for real, it uses %LOCALAPPDATA%\Packages\<its package>\LocalState\BetterClipboard). Logs never
contain clipboard content.
The research behind all this — how Win+V is built (service cbdhsvc, the TextInputHost panel,
Explorer's hotkey), why it forgets, its on-disk format for pins, and the measurements quoted above — is
in CLAUDE.md.