Merge pull request #780 from mitchellh/macos-no-equiv

macos: clear keyboard shortcut if unbound on reload
This commit is contained in:
Mitchell Hashimoto
2023-11-01 13:05:22 -07:00
committed by GitHub

View File

@ -224,7 +224,9 @@ class AppDelegate: NSObject, ObservableObject, NSApplicationDelegate, GhosttyApp
let trigger = ghostty_config_trigger(cfg, action, UInt(action.count))
guard let equiv = Ghostty.keyEquivalent(key: trigger.key) else {
Self.logger.debug("no keyboard shorcut set for action=\(action)")
// No shortcut, clear the menu item
menu.keyEquivalent = ""
menu.keyEquivalentModifierMask = []
return
}