I have an NSViewController subclass and I would like to be able to receive keyboard events. However, currently the methods keyUp: and keyDown: are not being called on this view controller when keys are pressed in my app. In my view controller subclass I have this code:
AND
But the keyUp: and keyDown: methods are still not called on my view controller. My view controller's view is visible and takes up most of the screen.
Code:
-(BOOL)acceptsFirstResponder {
return YES;
}
AND
Code:
[self.view.window makeFirstResponder:self];
But the keyUp: and keyDown: methods are still not called on my view controller. My view controller's view is visible and takes up most of the screen.