microsoft/PowerToys

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

Open

#26,167 创建于 2023年5月23日

在 GitHub 查看
 (2 评论) (6 反应) (0 负责人)C# (7,978 fork)batch import
Help WantedIdea-EnhancementProduct-Peek

仓库指标

Star
 (133,154 star)
PR 合并指标
 (平均合并 14天 20小时) (30 天内合并 117 个 PR)

描述

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.

贡献者指南