macOS: toggle_visibility global keybinding doesn't work when Ghostty is focused #11255
-
Issue DescriptionWhen using a global keybinding for The root cause is a gap in key event handling between the
This means global-scope keybindings like I have a working fix at: https://github.com/mac0ne/ghostty/tree/fix/global-keybinds-macos Expected BehaviorPressing the configured global keybinding (e.g. Actual BehaviorThe keybinding only activates Ghostty when it is hidden/unfocused. Pressing the same keybinding while Ghostty is focused does nothing — the app remains visible. Reproduction Steps
Ghostty LogsOS Version InformationmacOS 26.3.1 (Linux only) Display ServerNone (Linux only) Desktop Environment/Window ManagerNo response Minimal Ghostty Configurationkeybind = global:cmd+escape=toggle_visibilityAdditional Relevant ConfigurationThis issue is macOS-only. The Linux/GTK implementation uses the XDG Desktop Portal GlobalShortcuts interface, where the desktop environment handles key interception and delivers activation signals regardless of app focus state. I acknowledge that:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
This also breaks window managers like aerospace, which don't receive global commands when ghostty is focused. I'd be super grateful if this gets into 1.3.1! |
Beta Was this translation helpful? Give feedback.
-
|
It works fine for me Screen.Recording.2026-03-23.at.18.45.03.mp4 |
Beta Was this translation helpful? Give feedback.
it turned out to be an issue with macOS application permissions. Deleting the application and removing relevant permission records in Settings-> Privacy&Security->Accessibility resolved the issue with global keybinding when Ghostty is NOT focused.