Improve key view loop processing by always shifting keyboard focus to

the next and previous key view, respectively, upon receving Ctrl-Tab
and Ctrl-Shift-Tab keyboard events.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29013 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2009-11-14 22:45:23 +00:00
parent 84a6777ed7
commit 8c9b9aff31
2 changed files with 21 additions and 1 deletions

View file

@ -1,5 +1,9 @@
2009-11-14 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSWindow.m (-sendEvent:): Always shift keyboard focus to
the next and previous key view, respectively, upon receiving
Ctrl-Tab and Ctrl-Shift-Tab keyboard events.
* Source/NSTextView_actions.m (-validateMenuItem:,
-validateUserIntefaceItem:): Implement menu and user interface
item validation for NSTextView. The list of validated actions is

View file

@ -3729,6 +3729,22 @@ resetCursorRectsForView(NSView *theView)
break;
case NSKeyDown:
/* Always shift keyboard focus to the next and previous key view,
* respectively, upon receiving Ctrl-Tab and Ctrl-Shift-Tab keyboard
* events. This means that the key view loop won't get stuck in views
* that interpret the Tab key differently, e.g., NSTextView. (cf. the
* Keyboard Interface Control section in Apple's Cocoa Event-Handling
* Guide).
*/
if (([theEvent modifierFlags] & NSControlKeyMask)
&& [[theEvent charactersIgnoringModifiers] isEqualToString: @"\t"])
{
if ([theEvent modifierFlags] & NSShiftKeyMask)
[self selectPreviousKeyView: self];
else
[self selectNextKeyView: self];
}
else
[_firstResponder keyDown: theEvent];
break;