This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFC: bind of Enter keys to all buttons


Fernando Nasser wrote:
> 
> Jim Ingham wrote:
> >
> > Also sprach Fernando Nasser:
> >
> > > Is there any thing that prevents us to do this?  Is someone aware of a button
> > > anywhere that shoud not execute its command when it is selected and we press
> > > one of the Enter keys?
> > >
> >
> > You really shouldn't do it this way, since this does not ensure that there
> > is UI indicating that the button in question IS the default button (usually
> > there is a little focus ring around the "default" button).  If you just make
> > it so that any button that has the focus will activate on return,
> 
> Yes, that is what someone asked for: return would activate the button with the
> foucus.  Presently a "sapace" does it.
> 

Return should activate the default button (normally the OK button).

The space bar invoking the button is stolen from Windows, but I see no
reason to change it. There is no point in having a default button if you
have to tab to it to invoke it.

> > then it is
> > too easy not to link the activation of the button to its correct appearance.
> 
> I am not sure if I understood that part...
> 
> > This should really be handled in a dialog class - which is where the default
> > buttons almost invariably show up.  Then you can set the default button OF
> > THE DIALOG, and ensure that you a) focus on it, b) give it the highlight
> > ring and c) activate it as you do above.
> >
> 
> I see, we are talking about two different things.  I am not meddling with the
> default button, it is done like you said and I would never change that.
> 
> I am just proposing to add a default handler for button events so that hitting
> Return or KP-Enter executes the -command
> Currently "space" does that and it is very strange.
> 
> What I was trying to do is a Class Binding (instead of a bind for every single
> button that we add around)...
> 
> But this does not seem to be very reliable.  It sometimes work, sometimes not, works
> for some windows and not others.  Looks like a bug to me.
> 
> --
> Fernando Nasser
> Red Hat - Toronto                       E-Mail:  fnasser@cygnus.com
> 2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
> Toronto, Ontario   M4P 2C9              Fax:  416-482-6299

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]