KEYNAV:Button (Bug 53709)



If a GtkButton shares the same mnemonic as another control in the same
context, the button should not be activated when it is given focus by using
that mnemonic.  In this case, activation should need to be done explicitly
by pressing Spacebar when the button has focus.

(This is an instance of the general behaviour recommended for Gtk 2.0 for
clashing mnemonics-- repeatedly pressing that mnemonic should cycle focus
through all widgets that share the mnemonic, but not activate any of them).


<POB> This works as described. If there is more than one widget with the 
same mnemonic then gtk_window_activate_mnemonic() calls 
gtk_widget_mnemonic_activate() with group_cycling argument set to TRUE, which
means that the mnemonic is not unique. The widget's activation function
therefore knows whether the mnemonic was unique. </POB> 

When a GtkButton has focus, Spacebar should activate it.  Pressing Enter
should always activate the window's default button if it has one, or do
nothing if it doesn't have one, regardless of which control currently has
focus (be it a GtkButton or not).  The only exception to this is when the
control that does have focus over-rides Enter for its own purposes, e.g. a
multi-line text field.

<POB> Spacebar activates a GtkButton which has focus but pressing Enter also
activates it rather than the window's default button. You commented that the 
behavior of the Enter button is still under discussion. Is there an outcome on
that?</POB>.

When a control that doesn't accept keyboard input has focus (e.g.
textfields, buttons, tree/list-derived widgets), it would be nice if all
mnemonics in that the current context were active whether or not the Alt
key was held at the same time.  At the very least, though, in any message
box, it should be posisble to select any of the command buttons just by
pressing the underlined character on any of those buttons, unmodified.

<POB> I do not think that it is possible to determine whether the focus 
widget accepts keyboard input but it may not matter as the focus widget
handles keyboard input before the accelerator groups for the window are
used.

The Alt key is defined as the mnemonic_modifier for the window. Currently
a check is made that the modifier of the mnemomic entered by the user 
matches the mnemonic_modifier of the window. It sounds like you are requesting
that this check be omitted. </POB>






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