discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSButtons and the Return key


From: Wolfgang Lux
Subject: NSButtons and the Return key
Date: Wed, 29 Oct 2008 18:24:09 +0100

In response to my little rant about broken key view loops
in the NSAlert and NSSavePanel classes in one of my yesterday's
patches, Fred kindly pointed me to this message from the
gnustep-dev mailing list:
http://lists.gnu.org/archive/html/gnustep-dev/2007-02/msg00167.html
In summary, Sergii proposed calling setRefusesFirstResponder:NO for
the non-default buttons of an alert panel in order to prevent the
user from selecting the wrong action accidentally by using the
Tab button.

I see the problem that Sergii wants solved here (and have indeed
been bitten by it myself). However, I think that the real problem
is that GNUstep's NSButtons fire their action upon pressing the
Return key. IMHO, NSButtons should handle only the Space key and
the Return key should always be sent to the default button (cell)
of a window (if there is any at all). Then one could include all
buttons in the key view loop with little risk of accidentally
invoking the wrong action, but at the same time all buttons
remain reachable via the keyboard for those that prefer it.

Any opinions on that matter?

Wolfgang






reply via email to

[Prev in Thread] Current Thread [Next in Thread]