Le 31 juil. 2012 à 17:16 Soir, Christian Schmitz a écrit: > I tried myself: > > a.keyEquivalent = encodings.UTF8.Chr(NSEventMBS.NSF6FunctionKey) > a.keyEquivalentModifierMask = NSEventMBS.NSCommandKeyMask > > this works for me and shows command F6 in the menu and menu item action is > executed when the app is frontmost. > > NSFunctionKeyMask is for fn key, so not needed here.
Thanks! I didn't think of passing the NSF6FunctionKey to the Chr function to get a string (I couldn't imagine it'd work). > And to get global key event for the case other apps are in foreground, please > use CarbonHotKeyMBS class. Yes, I already do like this. Showing Command-F6 in the menu is for visual indication. >> BTW: have you noticed about NSF35FunctionKey? Which keyboard has 35 function >> keys? A piano‽ > > A special one. > > Some people use special keyboards for special applications which have only > special keys :-) Surprising! _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
