From 011b8d250ab0aee5f0cc3ba850d3c8f8fc0b19cc Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Mon, 15 Nov 2010 14:25:47 +0100 Subject: [PATCH] remove second implementation of _processKeyboardUIKey: --- AppKit/CPWindow/CPWindow.j | 43 -------------------------------------- 1 file changed, 43 deletions(-) diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 87b2b4687..f118368e3 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -2354,49 +2354,6 @@ CPTexturedBackgroundWindowMask } } -/* - @ignore - Interprets the key event for action messages and sends the action message down the responder chain - Cocoa only sends moveDown:, moveUp:, moveLeft:, moveRight:, pageUp:, pageDown: and complete: messages. - We deviate from this by sending (the default) scrollPageUp: scrollPageDown: for pageUp and pageDown keys. - @param anEvent the event to handle. - @return YES if the key event was handled, NO if no responder handled the key event -*/ -- (BOOL)_processKeyboardUIKey:(CPEvent)anEvent -{ - var character = [anEvent charactersIgnoringModifiers], - uiKeys = [ - CPLeftArrowFunctionKey, - CPRightArrowFunctionKey, - CPUpArrowFunctionKey, - CPDownArrowFunctionKey, - CPPageUpFunctionKey, - CPPageDownFunctionKey, - CPEscapeFunctionKey - ]; - - if (![uiKeys containsObject:character]) - return NO; - - var selectors = [CPKeyBinding selectorsForKey:character modifierFlags:0]; - - if ([selectors count] <= 0) - return NO; - - if (character !== CPEscapeFunctionKey) - { - var selector = [selectors objectAtIndex:0]; - return [[self firstResponder] tryToPerform:selector with:self]; - } - else - { - // Cocoa sends complete: for the escape key (in stead of the default cancelOperation:) - // This is also the only action that is not sent directly to the first responder, but through doCommandBySelector. - // The difference is that doCommandBySelector: will also send the action to the window and application delegates. - [[self firstResponder] doCommandBySelector:@selector(complete:)]; - } -} - - (void)_dirtyKeyViewLoop { if (_autorecalculatesKeyViewLoop)