microsoft/PowerToys

Peek should have the option to close itself when releasing the shortcut keys

Open

#26,167 opened on May 23, 2023

View on GitHub
 (2 comments) (6 reactions) (0 assignees)C# (7,978 forks)batch import
Help WantedIdea-EnhancementProduct-Peek

Repository metrics

Stars
 (133,154 stars)
PR merge metrics
 (Avg merge 14d 20h) (117 merged PRs in 30d)

Description

Description of the new feature / enhancement

Right now after you Ctrl+Space to peek, you need to manually close the peek window.

It would be useful if the window would close itself once you release control;.

The way I think this should be implemented is via a separate shortcut option. The current shortcut opens the current window with the additional options such as resizing the preview or opening the file in its associated application. The new shortcut will open a popup window with minimal UI (just the preview) that will close itself once the modifier keys for the shortcut are released. It would not be possible to bind a shortcut without a modifier key.

Not sure if you can detect the release of keys for global hotkeys; you may need to just have the preview window poll for it. It will be in focus if that helps. If it loses focus you can just close it at that point too.

Scenario when this would be used?

Allows for quicker use of Peek.

Supporting information

When I heard of Peek this is what I thought it would be, for whatever that's worth.

Contributor guide