Re: colorsel keynav



Alexander Larsson <alla lysator liu se> writes:

> On 23 Mar 2001, Havoc Pennington wrote:
> 
> >
> > Hi,
> >
> >  - there's some bug in mnemonics exposed by the colorsel,
> >    will be visible once I commit, if you do Alt+G to
> >    jump to green, then try Alt+B to go to blue, it doesn't work.
> >    But Alt+B initially works.
> 
> This is not really a "bug". The reason this happens is that when you press
> Alt+G the green GtkEntry is focused. Then you press Alt+B, which gets
> swallowed by the GtkEntry meaning move one word back. Since widget
> keybindngs override mnemonics this means the blue entry isn't focused.
> 
> The following widgets currently have default Alt+xx keybindings that can
> collide with mnemonics:
> 
> GtkEntry, GtkText and GtkTextView:
>  Alt+b - word backwards
>  Alt+f - word forward
>  Alt+d - delete word from cursor
>  Alt+\ - Delete whitespace
> 
> GtkCombo:
>  Alt+n - next row
>  Alt+p - previous row
> 
> The solution would be to not use any of these mnemonic keys when you have
> such widgets in your window. This gets worse if you have custom
> keybindings of course...

Mnemonics/accelerators should simply be checked before widget keys. 
(Rational explained in some detail in one of my previous mails.)

GtkEntry/GtkText swallowing accelerators Alt-F is an extremely 
common problem with GTK+-1.2.

Basically, GtkEntry/GtkText should have no Alt-xx modifiers by default,
but I think checking the accelerators first is the best way to 
ensure things work properly.

Regards,
                                        Own




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