如何处理键盘快捷键(Command + control等快捷方式)?

时间:2012-01-25 08:15:05

标签: cocoa keyboard keyboard-shortcuts

如何在KeyDown中获取特定组合的keyCode?什么是Control + Option + A的keyCode。还是Command + Control +Shift +X

1 个答案:

答案 0 :(得分:1)

[NSEvent modifierFlags]将返回当前关闭的修饰键的位掩码(http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSEvent_Class/Reference/的reference.html)