cocoabits / MASShortcut

Modern framework for managing global keyboard shortcuts compatible with Mac App Store. More details:
http://blog.shpakovski.com/2012/07/global-keyboard-shortcuts-in-cocoa.html
BSD 2-Clause "Simplified" License
1.52k stars 220 forks source link

Hotkey handler not firing right away when a menu of the handling app is open #46

Open RicoKS opened 10 years ago

RicoKS commented 10 years ago

I noticed that the hotkey handler does not fire right away when a menu (popup or menu bar) of the app that installed the hotkey is open. Only when the menu is closed does the hotkey fire.

To reproduce:

→ Important: it has to be the menu of the app handling the hotkey

→ The handler will not be called until the menu closes

Expected: the handler should always fire as soon as the hotkey is pressed.

Note: if the menu belongs to another app, the handler is called right away.

shpakovski commented 9 years ago

Hello, I am not sure how to fix this. This looks like a problem with Carbon, which disables all hotkeys while the NSMenu is open.