Re: Arrow keys
Re: Arrow keys
- Subject: Re: Arrow keys
- From: email@hidden
- Date: Tue, 19 Mar 2002 18:25:48 -0800
Using the Interface Builder, is it possible to connect a button with an
arrow key?
I don't know.
If that isn't possible, can I add some code into my cocoa
app which will then call the same functions as the associated arrow
buttons?
Look at overriding keyDown: in your NSResponder subclass (an NSView
subclass, perhaps, or an NSWindow subclass) and checking for
NSUpArrowFunctionKey and the other three. Should be quite
straightforward. NSResponder is pretty well documented; look at how the
responder chain works for key events, and look at NSEvent's
documentation for how to get the character typed, the modifier keys, etc.
Good luck.
Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.