mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-20 17:16:26 +00:00
Fixes from n.pero
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4989 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9196accea4
commit
adba2520a6
4 changed files with 43 additions and 9 deletions
|
@ -294,8 +294,24 @@ id _nsbuttonCellClass = nil;
|
|||
|
||||
- (void) keyDown: (NSEvent*)theEvent
|
||||
{
|
||||
if ([self performKeyEquivalent: theEvent] == NO)
|
||||
[super keyDown: theEvent];
|
||||
if ([self isEnabled])
|
||||
{
|
||||
NSString *keyDescription = [theEvent charactersIgnoringModifiers];
|
||||
|
||||
// Handle SPACE or RETURN to perform a click
|
||||
if (([keyDescription compare: @" "] == NSOrderedSame)
|
||||
|| ([theEvent keyCode] == 0x0d))
|
||||
{
|
||||
[self performClick: self];
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Understand better, I don't think this should be here.
|
||||
if ([self performKeyEquivalent: theEvent] == YES)
|
||||
return;
|
||||
}
|
||||
|
||||
[super keyDown: theEvent];
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue