mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 16:51:56 +00:00
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:
parent
84a6777ed7
commit
8c9b9aff31
2 changed files with 21 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
||||||
2009-11-14 Wolfgang Lux <wolfgang.lux@gmail.com>
|
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:,
|
* Source/NSTextView_actions.m (-validateMenuItem:,
|
||||||
-validateUserIntefaceItem:): Implement menu and user interface
|
-validateUserIntefaceItem:): Implement menu and user interface
|
||||||
item validation for NSTextView. The list of validated actions is
|
item validation for NSTextView. The list of validated actions is
|
||||||
|
|
|
@ -3729,6 +3729,22 @@ resetCursorRectsForView(NSView *theView)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSKeyDown:
|
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];
|
[_firstResponder keyDown: theEvent];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue