isARepeat
イベントは繰り返しているかを返します
解説
キーイベントは繰り返しているかを返します。
キーイベントでなければNSInternalInconsistencyExceptionを起こします。
返り値
( BOOL )
YES/NO
引数
フレームワーク
ApplicationKit
クラス
NSEvent
Instance Methods
使用可能
10.0
参照
+ keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifier:isARepeat:keyCode:
例文
#import "MyButton.h" @implementation MyButton - (BOOL)performKeyEquivalent:(NSEvent *)anEvent { [self setTitle:[anEvent characters]]; if ([anEvent isARepeat]){ NSLog(@"YES"); }else{ NSLog(@"NO"); } return YES; } @end