Skip to content

Shortcuts keep the keyboard layout TablePro launched with #4421

Done

Description

@datlechin

What happened?

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

  1. Add the U.S. and German input sources. Select U.S. and launch TablePro.
  2. Switch to German.
  3. In Settings > Keyboard, record Commit Transaction (unbound by default) as Control-Option-Command and the key that types Y on German.
  4. The recorder and the menu item show ⌃⌥⌘Z, the letter that key types on U.S.
  5. 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).

Database type

N/A

TablePro version

main (f67b55a)

Platform

macOS

Found during the 2026-11-22 perf audit, by reading the code while profiling launch.

Activity

  1. added
    bug
    platform-macos
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplatform-macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions