I'm learning how to build program with Cocoa. I'm using a sample Apple application that record video from WebCam. I'd like to start ant stop video capture by key press. I've tried to override Keydown event but I've read that It's not possible in an NSObject. How can I handle this kind of event?
The class of application extends a NSObject class.
This is the code:
- (void)keyDown:(NSEvent *)event {
NSLog(@"Hi there");
NSString *characters = [event characters];
if ([characters length]) {
switch ([characters characterAtIndex:0]) {
case NSUpArrowFunctionKey:
NSLog(@"Key UP");
break;
}
}
}
thanks a lot and sorry for my very bad english!
Andrea
PS: What's a very good book to start learn MacOS Programming?