Re: gnome keys sucks



Geoff Reedy wrote:

> On Fri, Aug 25, 2000 at 10:07:14PM +0200, Kjartan Maraas <kmaraas online no> said
> >
> > And it doesn't work if NumLock is on :)
>
> Keybindings being non-functional when NumLock is a problem that (in my
> experience) quite a number of X applications have.  The deal is that on all
> (most) X servers NumLock is a modifier.  Therefor Alt-f becomes Alt-NumLock-f
> when numlock is on.  One particularly annoying instance that I can think of
> is that Netscape with the translations that allow scrolling with a mouse as
> they are found in most distros and web pages don't work with NumLock on.  Are
> there any other places in GNOME where having NumLock on causes undesirable
> behavior?

Of course. Cursor movement with the numeric cursor keys in the editable
widgets is not possible nowadays. For example, is a pain in the as* to
make editable widgets work with KP_Left (one character left, usually).
Explanation:

If you press Left (Left on the individual cursor keys, not the numerical
ones), then it's easy to receive this event, but with KP_Left is another
story, because KP_Left is sent when Num Lock is off, but otherwise is
sent KP_4 (the contrary is true when Num Lock is on, and in addition you
have pressed Shift too).
What does this mean? Basically, that you have to check whether Num Lock
is on or not (appart from the Shift state, obviously). But the task is
quite hard because you don't know exactly what MOD? (MOD1,MOD2, MOD3,
...) modifier is Num Lock attached to. So in the end, you can't handle
numerical arrow keys properly. 
Suppose you are trying to select some text (with Shift+arrows). Then
with the normal arrows, everything is OK because you don't have to care
about Num Lock (the events sent are always Left,Right, ...). But with
Shift+Numerical arrows you get something like KP_4, KP_6, KP_8, KP_2.
(And the programmer doesn't know if these come from a Shift or from the
Num Lock being active, thus the problem...).
Go, try it in every X application you will see that numerical arrows
don't work as properly as in Windows...

> If so they should probably get fixed, since users expect that
> Control-s will do the same thing whether numlock is on or off.
>
> --
> Geoffrey Reedy                                       vader21 imsa edu
>
> "Unix-to-Unix Copy Program;" said PDP-1.  "You will never find a more
> wretched hive of bugs and flamers.  We must be cautious."
>                                 -- DECWARS
>
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list





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