You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shortcuts keep the keyboard layout TablePro launched with #4421
TablePro reads the keyboard layout once, at launch. After an input source switch, shortcut labels and menu key equivalents still use the launch layout until the next launch, so a shortcut recorded after the switch shows a different letter from the key pressed.
Steps to reproduce
Add the U.S. and German input sources. Select U.S. and launch TablePro.
Switch to German.
In Settings > Keyboard, record Commit Transaction (unbound by default) as Control-Option-Command and the key that types Y on German.
The recorder and the menu item show ⌃⌥⌘Z, the letter that key types on U.S.
Relaunch with German selected. The same binding now shows ⌃⌥⌘Y.
Expected behavior
Labels and menu key equivalents follow the selected input source without a relaunch: the key maps rebuild when it changes, and the menus and Settings refresh.
Code path
KeyboardLayout.maps is a static let built once from TISCopyCurrentASCIICapableKeyboardLayoutInputSource (apple/TablePro/Core/KeyboardHandling/KeyboardLayout.swift:29, :40-76). Nothing in the app observes kTISNotifySelectedKeyboardInputSourceChanged.
Bindings are stored as key codes (apple/TablePro/Models/UI/BoundKey.swift:4-5, :21-33). Labels and menu equivalents turn them back into characters through those maps (BoundKey.swift:119, :164; apple/TablePro/Core/Menu/MenuItemFactory.swift:49-55).
defaultShortcuts turn their characters into key codes once, at first use (apple/TablePro/Models/UI/KeyboardShortcutModels.swift:716, BoundKey.swift:55).
Activity