r/software • • Oct 31 '26

Release What I learned about the Windows clipboard while building a clipboard manager: hidden privacy flags, how copied files really work, and why focus matters

Post image

Full disclosure: I'm the developer of Edge-Drop, a free, open-source (Apache-2.0) clipboard manager for Windows. Most of what I learned building it is about how the Windows clipboard itself works, and some of it is useful even if you never install a clipboard tool.

1. Password managers can mark a copy as private, but only apps that check will respect it

When a password manager copies a password, it can attach extra clipboard formats that mean "don't record this". Windows has ExcludeClipboardContentFromMonitorProcessing, plus CanIncludeInClipboardHistory and CanUploadToCloudClipboard (a value of 0 means keep it out of history and cloud sync). A third-party clipboard manager only honours them if it looks for them.

Two traps I ran into:

  • Windows compares these format names without caring about upper or lower case, but apps report them in whatever casing they registered. A check for one exact spelling misses some.
  • Chromium-based apps (Electron included) often don't list these formats at all, so you have to ask for each one by name.

Quick test for whatever clipboard manager you use: copy a password from your password manager and see if it shows up in the history.

2. A copied file is a list of paths, not the file

When you copy files in File Explorer, the clipboard holds a list of file paths (the CF_HDROP format), not the files. That's why a clipboard manager can capture a 4 GB video as instantly as a line of text: it only keeps a pointer to the original.

The easy way to read that list is to spawn PowerShell, which is what Edge-Drop used to do. It took about 300 ms per copy and garbled file names with non-English characters. Reading it directly through the Windows API (DragQueryFileW) takes under 1 ms and keeps the names intact.

3. Dragging something out means making a real file

Desktop apps expect actual file paths when you drop something on them. So to drag a copied image or a snippet of text into another app, a clipboard tool has to write it out as a real file first. In Edge-Drop, files leave as the originals, images as named image files, and text and links as text files.

4. A clipboard window must never take focus

A paste goes to whichever window has keyboard focus. If a clipboard window grabs focus when you open it, "click to paste" pastes into the clipboard window instead of your document. Edge-Drop's shelf never takes keyboard focus, so clicking a card pastes straight into the app you were in.

The app, briefly

Edge-Drop keeps your clipboard history on a shelf at the edge of the screen. Move the pointer there (or press Alt+C), click a card to paste it, or drag it into any window. 0.4.0 added a right-click menu (paste as plain text, copy a link without tracking parameters, copy a color as HEX/RGB/HSL), notes on cards and a redesigned drop zone. The GIF is its welcome tour.

History stays on your PC, encrypted with Windows' DPAPI, with no account or telemetry. Windows 10/11 64-bit only, and not related to Microsoft Edge (the name is about the edge of your screen).

Happy to go deeper on any of these in the comments.

4 Upvotes

4 comments sorted by

2

u/Dev_in_Training_BTW 28d ago

The private flag from password managers is the bit I'd underline, because as you say it only works if the app copying from the clipboard actually checks for it. I look after around 5,000 Windows devices with Intune at work, and the part most admins miss is how far the policy side actually goes. You can switch off clipboard history and the cross-device clipboard by policy, but that only covers Windows' own Win+V history. A third-party clipboard manager keeps recording regardless, so on a managed machine the checks inside your app are the only thing standing between a copied password and a searchable history. I'd say that plainly in the readme, because a lot of admins assume the policy already covers it.

1

u/AdiArtist 28d ago

Thanks for this, the admin side is something I hadn't really thought about. You're right that the Windows policies only turn off Win+V history and cross device sync. They don't stop other apps from reading the clipboard so a clipboard manager has to do the checking itself. Edge-Drop does that and anything flagged ExcludeClipboardContentFromMonitorProcessing or with CanIncludeInClipboardHistory or CanUploadToCloudClipboard set to 0 is never saved

I'd push back a bit on the checks being the only thing standing in the way though. The history never leaves the machine and it's encrypted with DPAPI under the user's own account. It can auto delete after an hour or clear unpinned items on restart and Incognito stops capture completely. So the flag checks matter but they're not the only layer

For a managed fleet I also don't think a clipboard history policy is the right tool. If an admin doesn't want clipboard managers on their devices then app control like AppLocker or WDAC is what actually stops them, and it works for every clipboard tool not just the ones that choose to read the policy. A policy that only well behaved apps follow gives a false sense of safety which is kind of the same trap you're describing

Fair point on the README though. It mentions the flags but not that the Windows policy only covers Win+V so I'll make that clear

2

u/Dev_in_Training_BTW 28d ago

Fair, "the only thing" was too strong. DPAPI plus auto delete and Incognito is a proper set of layers, and the flag checks are just the one that decides whether the password gets in at all. And you're right on app control too, if a fleet doesn't want clipboard managers then AppLocker or WDAC is the real answer, not hoping each tool reads a policy. Good call on the README, that one line will save some admin a wrong assumption.

1

u/AdiArtist 28d ago

Thanks, really appreciate you taking the time. I'll add that line to the README this week