performKeyEquivalent:
代替キーを押したときに呼ばれます
-(BOOL)performKeyEquivalent:(NSEvent *)theEvent:
解説
代替キーを押したときに呼ばれます。
サブクラスでオーバーライドして使います。
返り値
( BOOL )
YES/NO
引数
( NSEvent * )theEvent
イベント
フレームワーク
ApplicationKit
クラス
NSResponder
Instance Methods
使用可能
10.0
参照
- performKeyEquivalent:(NSView)
- performKeyEquivalent:(NSButton)
例文
#import "MyButton.h" @implementation MyButton -(BOOL)performKeyEquivalent:(NSEvent *)theEvent { NSLog(@"key!"); [super performKeyEquivalent:theEvent]; return YES; } @end