mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 10:30:48 +00:00
Add help key support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23749 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8a49acfb4c
commit
ebbab146de
3 changed files with 32 additions and 0 deletions
|
@ -2807,6 +2807,12 @@ resetCursorRectsForView(NSView *theView)
|
|||
character = [characters characterAtIndex: 0];
|
||||
}
|
||||
|
||||
if (character == NSHelpFunctionKey)
|
||||
{
|
||||
[NSHelpManager setContextHelpModeActive: YES];
|
||||
return;
|
||||
}
|
||||
|
||||
// If this is a TAB or TAB+SHIFT event, move to the next key view
|
||||
if (character == NSTabCharacter)
|
||||
{
|
||||
|
@ -2866,6 +2872,27 @@ resetCursorRectsForView(NSView *theView)
|
|||
[super keyDown: theEvent];
|
||||
}
|
||||
|
||||
- (void) keyUp: (NSEvent*)theEvent
|
||||
{
|
||||
if ([NSHelpManager isContextHelpModeActive])
|
||||
{
|
||||
NSString *characters = [theEvent characters];
|
||||
unichar character = 0;
|
||||
|
||||
if ([characters length] > 0)
|
||||
{
|
||||
character = [characters characterAtIndex: 0];
|
||||
}
|
||||
if (character == NSHelpFunctionKey)
|
||||
{
|
||||
[NSHelpManager setContextHelpModeActive: NO];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
[super keyUp: theEvent];
|
||||
}
|
||||
|
||||
/* Return mouse location in reciever's base coord system, ignores event
|
||||
* loop status */
|
||||
- (NSPoint) mouseLocationOutsideOfEventStream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue