I want to react on hot key press by displaying NSMenu
at mouse cursor position.
My application is UIElement
and doesn't have its own window.
I know there is method of NSMenu
:
-(void)popUpContextMenu:(NSMenu *)menu
withEvent:(NSEvent *)event
forView:(NSView *)view;
But it seems it doesn't work when there is no view :(.
Should I create a fake transparent view at mouse cursor position, and then display there NSMenu
, or there is better way?
May it can be implemented using Carbon?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With