Repository navigation
feat(windows): show Ctrl+1..9 shortcut hints while Ctrl is held in QuickLauncher - #7590
Merged
Merged
Conversation
M4n5ter
reviewed
Dec 4, 2026
M4n5ter
left a comment
Member
There was a problem hiding this comment.
English
The Win32 modifier tracking in nsh-platform-windows and direct2d.rs looks solid (symmetric left/right VK handling, AltGr resampling via GetAsyncKeyState, menu/focus/hide resets, and edge deduplication). One cleanup suggestion:
Unify macCommandHeld and windowsCommandHeld into one watcher in QuickLauncher.tsx
products/maka/workbench/app/QuickLauncher.tsxcurrently splits into two parallel paths: an outer persistentwatchLauncherCommandon Windows passed viawindowsCommandHeld, and an innermacCommandHeldinside<Launcher>on macOS.- Looking at
products/maka/desktop-shell/src/appkit.rs(FlagsChangedlocal monitor) andHostInbox, macOS also emitsquickLauncher.commandChangedwhile QuickLauncher is hidden or unmounted (e.g. duringreading()/conversing()/editor()), so it has the exact same staleHostInboxreplay issue. - Keeping a single outer
watchLauncherCommandforplatform.os === 'macos' || platform.os === 'windows'and passing onecommandHeldaccessor into<Launcher>removes the dual-track code and fixes macOSHostInboxbuildup at the same time.
简体中文
nsh-platform-windows 和 direct2d.rs 这套 Win32 修饰键跟踪写得很扎实(左右键对称、GetAsyncKeyState 处理 AltGr、菜单/焦点/隐藏重置以及边沿去重都很到位)。只有一个简化建议:
建议在 QuickLauncher.tsx 中把 macCommandHeld 和 windowsCommandHeld 合并为单轨
- 目前
products/maka/workbench/app/QuickLauncher.tsx留了两套平行路径:Windows 在外层QuickLauncher常驻订阅watchLauncherCommand再通过windowsCommandHeld传给<Launcher>,macOS 则留在<Launcher>内部单独维护macCommandHeld。 - 对照
products/maka/desktop-shell/src/appkit.rs(FlagsChanged本地监听)和HostInbox,macOS 在 QuickLauncher 隐藏或<Launcher>卸载(reading()/conversing()/editor())期间同样会持续发送quickLauncher.commandChanged,存在一样的HostInbox积压回放问题。 - 直接在外层对
platform.os === 'macos' || platform.os === 'windows'统一挂一个watchLauncherCommand、只传一个commandHeld给<Launcher>,既能去掉双轨逻辑,也能顺手修掉 macOS 的事件积压。
Generated-by: Maka
Contributor
Author
M4n5ter
approved these changes
Dec 4, 2026
M4n5ter
left a comment
Member
There was a problem hiding this comment.
English
LGTM — unified single-track watchLauncherCommand across macOS and Windows looks clean.
简体中文
LGTM —— macOS 和 Windows 统一为单轨 watchLauncherCommand 后很干净。
Merged
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Windows, hold Ctrl by itself in QuickLauncher to reveal Ctrl+1 through Ctrl+9 hints for the numbered results. Other modifiers suppress the hints, including AltGr. The macOS Cmd path is unchanged.
The Win32 path handles generic, left and right modifier virtual keys symmetrically. It resets or resynchronizes hint state across WM_CANCELMODE, WM_ENTERMENULOOP, WM_EXITMENULOOP, WM_ACTIVATE (WA_INACTIVE), WM_KILLFOCUS and WM_SETFOCUS. The window keeps consuming modifier updates even while the launcher is hidden, so reopening it does not replay stale HostInbox events.
Verification
AI use
Tool(s) and scope: Maka assisted with PR preparation and submission.
Checklist
Does this PR entail a breaking change or persisted-data migration?
Does this PR entail a change in behavior?