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:
Richard Frith-MacDonald 1999-10-12 12:59:10 +00:00
parent 9196accea4
commit adba2520a6
4 changed files with 43 additions and 9 deletions

View file

@ -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];
}
//