Skip to content

Hold Right Ctrl to reveal on Windows - #22

Draft
jay739 wants to merge 2 commits into
mainfrom
feat/windows-hold-to-reveal
Draft

jay739 wants to merge 2 commits into
mainfrom
feat/windows-hold-to-reveal

Conversation

@jay739

@jay739 jay739 commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

What

Hold Right Ctrl to reveal all windows on Windows, the counterpart of the Mac's Fn-to-reveal (Windows never sees the Fn key). The haze fades out quickly while the key is held and comes back on release. It only starts after Right Ctrl has been held on its own for about a quarter of a second, and pressing any other key or clicking cancels it until the key is released, so shortcuts like Ctrl+C never flash the haze. On by default, as on the Mac.

One step a day:

  • Engine: the HoldToReveal setting and a revealed state with a quick fade
  • Detect Right Ctrl held on its own with a low-level keyboard hook
  • Settings window: "Hold Right Ctrl to reveal all windows" in the Focus group
  • windows/README.md and README.md: Fn-to-reveal moves out of "macOS extras"

Why

Peeking at a background window without switching to it is one of the most useful parts of the Mac app, and Windows users had no way to do it.

How it was tested

  • Existing tests pass (windows\test.bat), build has no warnings
  • New behavior is covered by a test: the engine was checked by a script against the built exe instead, since windows/tests only covers the update checker (on by default, saved and loaded, old settings files load with it on, no haze while revealed, holding the key does nothing with the setting off). The reveal rules were driven with simulated keys, clicks and timer ticks: a plain hold, auto-repeat, Right Ctrl+C and Ctrl+click, a key pressed mid-reveal, Left Ctrl, normal typing, a missed key-up and a quick tap (10 of 10 pass)
  • Docs updated
  • Hands-on: on a real Windows desktop, holding Right Ctrl alone fades the haze out and releasing it brings it back; a quick tap, Right Ctrl+C and Ctrl+click never reveal; another key mid-reveal brings the haze back; Left Ctrl does nothing

HoldToReveal (on by default, like Fn-reveal on the Mac) is saved with the
other settings, and a settings file without the line loads with it on.
The engine gains a revealed state that shows no haze on any monitor while
it lasts. A change of reveal state fades over about 90 ms whatever the
Fade setting is, so the haze gets out of the way at once and comes back
promptly. Turning dimming or the setting off still wins. Nothing sets the
revealed state yet; detecting the reveal key comes next.
A low-level keyboard hook, present only while hold-to-reveal is on, feeds
a small RevealKeyTracker. Holding Right Ctrl on its own for 250 ms reveals
all windows and releasing it brings the haze back. Any other key, or a
mouse click or scroll, during the hold cancels the reveal until Right Ctrl
is released, so shortcuts like Ctrl+C and Ctrl+click never flash the haze.
The hook only watches and never swallows a key.

While Right Ctrl is held, a 50 ms timer also checks the real key state,
because Windows hides key presses over an admin window from the hook and a
missed key-up would otherwise leave everything revealed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant