Created
January 26, 2010 05:54
-
-
Save saikat/286589 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void)keyDown:(CPEvent)anEvent | |
| { | |
| switch ([anEvent keyCode]) { | |
| case CPReturnKeyCode: | |
| [self addSelectedWidgetToScreen]; | |
| break; | |
| case CPRightArrowKeyCode: | |
| [self selectNextWidget]; | |
| break; | |
| case CPLeftArrowKeyCode: | |
| [self selectPreviousWidget]; | |
| break; | |
| case CPUpArrowKeyCode: | |
| [self selectWidgetAbove]; | |
| break; | |
| case CPDownArrowKeyCode: | |
| // TODO I have these comparisons to the dom event all over the place - this is a hack | |
| // to keep firefox from sending a stale event - fix this - see | |
| // my google groups post about it | |
| [self selectWidgetBelow]; | |
| break; | |
| default: | |
| [[self nextResponder] keyDown:anEvent]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment