How do I tell which key was pressed in a Cocoa Application (I know each key has an associated number)? In my case, I want to log the key to the console.
This is my code:
- (BOOL)acceptsFirstResponder {
return YES;
}
-(void)keyUp:(NSEvent*)event {
NSLog(@"Key %@", event);
}