Skip to content

Let a user-assigned Alt+Space shortcut beat the Windows system menu - #14547

Merged
niksedk merged 1 commit into
mainfrom
claude/alt-space-shortcut-14536
Sep 5, 2026
Merged

Let a user-assigned Alt+Space shortcut beat the Windows system menu#14547
niksedk merged 1 commit into
mainfrom
claude/alt-space-shortcut-14536

Conversation

@niksedk

@niksedk niksedk commented Sep 5, 2026

Copy link
Copy Markdown
Member

Fixes #14536

Problem

Subtitle Edit opens the Windows system menu itself on Alt+Space (Avalonia does not forward the chord to the default window procedure). That handler is an app-wide tunnel-phase class handler on every Window, plus an explicit call in the main key handler. Both ran before the shortcut lookup and marked the event handled, so a shortcut the user bound to Alt+Space (e.g. Auto-break text) never fired and the system menu appeared instead.

Fix

  • IShortcutManager.HasShortcut(params string[] keys): order- and case-insensitive exact-chord lookup.
  • UiUtil.SetWindowSystemMenuOverride(window, predicate): a window can claim Alt+Space for itself; TryHandleWindowSystemMenu then leaves the event alone so normal shortcut handling runs.
  • Main window claims it while a shortcut is bound to Alt+Space (same policy as the bare-F10 menu rule from [SE 5.1.0-rc3] F10 menu focus shortcut can't be overwritten #12504).
  • Shortcut key-capture window always claims it so the chord can be recorded.
  • Every other window, and the main window without such a binding, keeps the Windows system menu.

Tests

New ShortcutsAltSpaceSystemMenuTests cover the lookup (order/case, supersets/subsets rejected) and assert the defaults never bind Alt+Space, so the system menu stays the out-of-the-box behaviour.

🤖 Generated with Claude Code

Subtitle Edit opens the Windows system menu itself on Alt+Space (Avalonia
does not forward the chord to the default window procedure), via an
app-wide tunnel-phase class handler on every Window plus an explicit call
in the main key handler. Both ran before the shortcut lookup and marked the
event handled, so a shortcut bound to Alt+Space never fired (#14536).

Add IShortcutManager.HasShortcut and a per-window override registry in
UiUtil: the main window claims Alt+Space while a shortcut is bound to it
(mirroring the bare-F10 rule from #12504), and the shortcut key-capture
window always claims it so the chord can be recorded. Everyone else keeps
the system menu.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@niksedk
niksedk merged commit abd4926 into main Sep 5, 2026
1 check passed
@niksedk
niksedk deleted the claude/alt-space-shortcut-14536 branch September 5, 2026 05:33
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.

Shortcuts Not Working SE5 RC2: Alt+Space

1 participant