I am trying to build a Mac App which displays images and I want to move on to the next image when I press the right arrow key. I have looked all over stackoverflow and the internet, but just can't seem to get it.
What I tried... I tried to use keyDown(theEvent: NSEvent)but it does not call when I press any keys. I believe this is because it is not in a text field of some kind, but not sure.
What Happens... When i'm testing the program, I press a key (with keyDown function ready to println("Key Pressed")) and I get the OS X reject noise and no println to the console.
I have heard of some people subclassing NSView to override acceptsFirstResponder, but I am new to subclassing so any direction you could point me in would be great. Or if there is a way to do it w/o subclassing NSView that would be great!
Thanks in advance! Sorry for the noobness.
NSWindow,NSTableView,NSButton? Also, please post what you have tried.