ApplicationDelegate is not a subclass of NSResponder, you may implement keyDown: method in it, but it will not get invoked when you press keys.
Even in a small app you want to use a controller subclass instead of dumping functionality in the app delegate.
So, you need to create a controller/subview and place it in your window and do the key handling there.
See if you can find the book 'Cocoa Programming for OS X' by Aaron Hillegass
There is a chapter on the keyboard events. I've attached the example project for your review.