From mboxrd@z Thu Jan 1 00:00:00 1970 From: Syd Polk To: Fernando Nasser Cc: Jim Ingham , insight@sourceware.cygnus.com Subject: Re: RFC: bind of Enter keys to all buttons Date: Mon, 14 Aug 2000 13:57:00 -0000 Message-id: <39985D35.373B87FE@cygnus.com> References: <39944D77.1BC31C2A@cygnus.com> X-SW-Source: 2000-q3/msg00165.html 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