I am trying to create a Mac application that displays images, and I want to go to the next image when I press the right arrow key. I looked through the entire stackoverflow stack and the internet, but just can't get it.
What I tried ... I tried to use keyDown(theEvent: NSEvent) , but it does not call when I press the keys. I believe this is because it is not in some kind of text area, but not sure.
What happens ... When I test the program, I press a key (with keyDown function ready for println("Key Pressed") ) and I get OS X rejection noise and do not print the console.
I heard about some NSView subclasses to override acceptsFirstResponder , but I'm new to the subclass, so any direction you could point me in would be great. Or if there is a way to do this without subclassing NSView, that would be great!
Thanks in advance! Sorry for the noobness.
source share