Skip to content

Fix layout-aware shortcut display on non-US keyboards#184

Merged
khoi merged 1 commit into
mainfrom
sbertix/182-shortcuts-azery
Mar 29, 2026
Merged

Fix layout-aware shortcut display on non-US keyboards#184
khoi merged 1 commit into
mainfrom
sbertix/182-shortcuts-azery

Conversation

@sbertix
Copy link
Copy Markdown
Collaborator

@sbertix sbertix commented Mar 28, 2026

Summary

  • Introduces a more robust reverse key code lookup (keyCode(forDisplayedKeyEquivalent:)) that scans the active keyboard layout across multiple modifier states (unmodified, shift, option, shift+option) so shortcut labels match what AppKit displays in the menu bar on non-US keyboards (e.g. AZERTY).
  • Passes modifier state through to UCKeyTranslate so shifted/optioned characters display correctly in shortcut labels.
  • Broadens TIS input source fallback chain (primary, layout, ASCII-capable) for better coverage of non-Latin input methods, and adds diagnostic logging at critical fallback points.
  • Adds 5 layout-agnostic tests for the reverse lookup covering nil results, modifier state priority, option layers, and case-insensitive matching.

Test plan

  • All 29 AppShortcutOverrideTests pass
  • Verify shortcut labels display correctly on AZERTY keyboard
  • Verify shortcut labels display correctly on US QWERTY keyboard
  • Verify Ghostty unbinds still work for all app shortcuts

Closes #182

@sbertix sbertix changed the base branch from main to sbertix/sidebar-ui March 29, 2026 00:02
@sbertix sbertix changed the base branch from sbertix/sidebar-ui to main March 29, 2026 00:03
@sbertix sbertix requested a review from khoi March 29, 2026 01:00
@khoi khoi merged commit b203d97 into main Mar 29, 2026
1 check passed
@khoi khoi deleted the sbertix/182-shortcuts-azery branch March 29, 2026 09:24
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.

Unusable worktree shortcuts on AZERTY keyboard

2 participants