Am 31.07.2012 um 16:37 schrieb Arnaud Nicolet <[email protected]>:

> Thanks. I've tried these statements:
> 

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.

And to get global key event for the case other apps are in foreground, please 
use CarbonHotKeyMBS class.

> My thought was to pass NSF6FunctionKey to the second parameter, but it's an 
> integer constant and I assume it's pointless to put it as a string literal. 
> What do you think about this?

it's the unicode character number. Just use chr with it.

> 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 :-)

Greetings
Christian

-- 
Check out the Omega Bundle:

http://www.omegabundle.com/

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to