Skip to content

KeyTips: menu/popup drill, hidden-level access keys stand down, focus-restore respects app gestures - #72

Merged
mstrobel merged 3 commits into
developfrom
fix/keytip-scoping-menus-popups
Sep 10, 2026
Merged

mstrobel merged 3 commits into
developfrom
fix/keytip-scoping-menus-popups

Conversation

@mstrobel

@mstrobel mstrobel commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Three KeyTip issues reported 2026-09-09.

1. Hidden levels leaked into the drill. Alt, H, B fired _Bold (under Format) instead of drilling the B group; Alt, P with no P badge fired _Paste. A letter the current level didn't claim fell through the dispatch to the inline access-key stage, which matches _x access keys on every surface whatever level the overlay shows. AccessKeyManager.ProcessKeyDown now refuses inline activation while the KeyTip controller is active (consumed in sticky mode; left to the remaining tails while Alt is physically held, so an Alt-bearing KeyBinding still fires). A group letter typed before the tab's group level was built (the level is parked until the post-layout hook) was matched against the root level: the controller now queues letters typed while a build is parked and replays them into the new level in order.

2. KeyTips for menus and popups. The deferred v2 leg of keytips-design §6. One rule for every popup (KeyTipPopupLevels): the opened popup's content is walked for its accelerator-eligible controls; a submenu header or a dropdown-bearing control drills again, everything else activates; a level built before the popup has a surface is null so the parked build retries next frame. Menu headers drill into their submenus; ribbon control levels drill BarDropDownButtons into their dropdowns; collapsed groups and the collapsed QAT opener drill into their flyouts; the toolbar overflow chevron carries badge 0 and drills into the overflow. Esc pops a level and closes the popup it opened. The overlay surface is now anchored directly above the surface the shown level's targets live on (WindowManager.AnchorKeyTipOverlay), so popup badges paint over their popup and under anything opened on top; level-0 discovery scopes to the active root, so bars behind a modal window are not badged.

3. File dialog Alt+P bounce. The overlay armed on the ribbon behind the dialog and restored its pre-Alt focus snapshot on Alt-release, yanking focus off the Places rail. Two fixes: RestoreFocus puts the snapshot back only when focus is still on it or parked on a bar surface by menu mode (focus an app gesture moved elsewhere stands), and with active-root scoping the overlay no longer arms against a ribbon behind a dialog at all.

Tests: KeyTipTests (+4), new KeyTipPopupDrillTests (5). Bars 311 / UI 3962 green. Design doc §6/§8/§14 updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_013qbF5ru6uh5w7fqhP3yoPE

mstrobel and others added 3 commits September 9, 2026 15:40
…letters typed ahead of a parked level are replayed into it

Two related escapes from the KeyTip drill (maintainer, 2026-09-09):
- 'Alt, P' with no P badge at the root fired a '_Paste' button two levels down, and 'Alt, H, B' fired '_Bold'
  under Format instead of drilling the B group. A bonked letter fell through the dispatch to the access-key stage,
  which matches access keys on every surface whatever level the overlay shows. AccessKeyManager.ProcessKeyDown now
  refuses inline activation while the KeyTip controller is active (a menu-mode bonk: consumed in sticky mode, left
  to the remaining tails while Alt is physically held — so an Alt-bearing KeyBinding still fires).
- A group letter typed before the tab's group level was built (the level is parked until the post-layout hook) was
  matched against the ROOT level. The controller now queues letters typed while a build is parked and replays them
  into the new level, in order; a still-ambiguous multi-char prefix is consumed rather than falling through.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013qbF5ru6uh5w7fqhP3yoPE
… moved while it was up

A file dialog's Alt+P focuses its Places rail, but the KeyTip overlay (armed on Alt-down against the ribbon
behind the dialog) restored its pre-Alt focus snapshot on Alt-release, bouncing focus straight back to the file
list (maintainer, 2026-09-09). RestoreFocus now puts the snapshot back only when focus is still on it or parked on
a bar surface by menu mode (the Alt-tap focus of the menu bar's first item is the move the restore exists to undo);
focus moved elsewhere in the active root is the app's decision. Regression test with an Alt+P KeyBinding in a Window.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013qbF5ru6uh5w7fqhP3yoPE
… collapsed groups, the collapsed QAT, toolbar overflow

The deferred v2 leg of keytips-design §6 (maintainer, 2026-09-09: 'key tips were never implemented for menus and
popups'). One rule for every popup (KeyTipPopupLevels): the opened popup's content is walked for its accelerator-
eligible controls; a submenu header or a dropdown-bearing control drills again, everything else activates; a level
built before the popup has a surface is null so the parked build retries next frame. Hosts: a menu header opens its
submenu (the access-key open) and badges the rows; a ribbon control level drills a BarDropDownButton into its
dropdown; a collapsed group / the collapsed QAT opener drill into their flyouts; the toolbar overflow chevron carries
badge 0 and drills into the overflow. Esc pops a level and its retract closes the popup it opened.

The overlay surface is now anchored directly above the surface the shown level's targets live on
(WindowManager.AnchorKeyTipOverlay — root / window / the drilled popup), so popup-level badges paint over their popup
and under anything opened on top of it; level-0 discovery scopes to the active root, so bars behind a modal window
are not badged. KeyTipPopupDrillTests; design doc §6/§8/§14 updated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013qbF5ru6uh5w7fqhP3yoPE
@mstrobel
mstrobel merged commit 3db6315 into develop Sep 10, 2026
3 checks passed
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