>>>>> On Thu, 30 Nov 100 10:53:30 -0600 (CST),  you said:


MON> Olivier Lecarme said...
MON> |
MON> |The problem is that the Gimp considers that the key in this position is
MON> |always a Backspace,

MON> I'm assuming you are using the X Window system and a UNIX variant,
MON> based on the systems you mentioned.  If so, the issue is probably
MON> not the GIMP, since it doesn't know anything about which keys are
MON> in which "positions".  It knows about keycodes, which are mapped
MON> to individual keys by the X11 server.

MON> Your server has some key mapped as the backspace key.  The GIMP
MON> simply uses whatever your X11 server thinks is the backspace key.

The problem is in the interpretation of the backspace key as an erasing
character, while the control code intended for that is the DEL
character. A backspace is a backspace, and nothing else.

MON> If there's a way to easily customize this in the GIMP, I don't
MON> recall it.  You can get a program called (I think) xkeyboard
MON> that wil let you easily determine and reconfigure your keyboard
MON> mapping.  If you can't find that, you'll need to run xevent from
MON> a terminal window, press the key in question inside the window
MON> that pops up, look in the terminal window to see what keycode was
MON> generated, then use xmodmap to change the mapping.

MON> | and thus defines code C-h as erasing the character
MON> |on left, while DEL erases the character on right. This is very
MON> |inconvenient when the keyboard is not conform to the dominant one.

MON> Actually, this is the normal behavior for text handling on almost
MON> every program I've ever used.

The fact than an error has been repeated a huge number of times does not
transform it in something right...

I just have had a quick dialogue with Lourens Veen about this matter. I
think that sending you a copy of the messages will explain you the whole
stuff in a simple way.



Could be me, but isn't the .Xmodmap file supposed to take care of that?
I'm using the Dvorak keymap on a Qwerty keyboard, and I simply installed
a different Xmodmap file, which works fine. Do you have the same problem
in other programs?

If so you could try putting

keycode 127 = Delete

in ~/.Xmodmap.

Lourens

Olivier Lecarme wrote:

[snip]

> The problem is that the Gimp considers that the key in this position is
> always a Backspace, and thus defines code C-h as erasing the character
> on left, while DEL erases the character on right. This is very
> inconvenient when the keyboard is not conform to the dominant one.
> 
>                         Olivier Lecarme




Of course, xmodmap would solve the problem for the Gimp. The problem is
that different programs have different behaviors. With the Digital LK401
keyboard, Netscape on a DEC computer uses the Delete key as expected, as
well as Emacs 20 or Xterm. With the NCD N108 keyboard, Netscape behaves
like the Gimp.

Moreover, I connect to several servers using several different
keyboards, and it would be extremely difficult to design a configuration
that would automatically adapt to all the possible cases. Since erasing
a character on the right is much less frequent that erasing it on the
left, my suggestion would be that Delete always erases on the left, and
that people who have a PC keyboard redefine it using xmodmap.


                        Olivier Lecarme




Yeah, I see the problem now, but isn't it so that the Xmodmap file is
meant to map tangible keys to X key events? In that case you should have
a different keymap for each keyboard. Perhaps you could create a modmap
that switches the delete button from "so that it works on the LK40" to
"so that it works on the NCD N108" and one for the other way around, and
then have two buttons on your desktop to switch?

Then changing from one keyboard to another would take only a single
mouseclick.

I can see that your solution would work, but it would "break" gimp for
everyone using a PC keyboard, in a sense that they have to adapt their
xmodmap, thereby possibly breaking other programs.

At any rate, isn't this an X related question rather than a gimp related
one? I suppose gimp just interprets the key signals X sends it, but I'm
not sure about that.

Lourens


Olivier Lecarme wrote:
> 
> Of course, xmodmap would solve the problem for the Gimp. The problem is
> that different programs have different behaviors. With the Digital LK401
> keyboard, Netscape on a DEC computer uses the Delete key as expected, as
> well as Emacs 20 or Xterm. With the NCD N108 keyboard, Netscape behaves
> like the Gimp.
> 
> Moreover, I connect to several servers using several different
> keyboards, and it would be extremely difficult to design a configuration
> that would automatically adapt to all the possible cases. Since erasing
> a character on the right is much less frequent that erasing it on the
> left, my suggestion would be that Delete always erases on the left, and
> that people who have a PC keyboard redefine it using xmodmap.
> 
>                         Olivier Lecarme




   At any rate, isn't this an X related question rather than a gimp related
   one? I suppose gimp just interprets the key signals X sends it, but I'm
   not sure about that.

When a user types a Backspace, and in the absence of any use of xmodmap,
X sends the keysym Backspace. When a user types a Delete, X sends the
keysym Delete. The problem is that too many programs have taken the
habit to interpret Backspace as a Delete. Then, since there is a Delete
key elsewhere on the keyboard (a real design mistake on this keyboard),
why not interpret it in any other useful way ?

In a non-graphic application, for example in a Telnet session or in a
GNU Screen session, the Backspace key sends a C-h and the Delete key
sends a DEL character, meant to erase the character on the left. This is
independent of the position of these keys on the keyboard.

   I can see that your solution would work, but it would "break" gimp for
   everyone using a PC keyboard, in a sense that they have to adapt their
   xmodmap, thereby possibly breaking other programs.

This would not break the Gimp, only it would mean that the few persons
who know how to use the "erase on right" functionality would need to
type a C-d like in Emacs, or to use xmodmap. Note that on the contrary,
the DEL code is the only ASCII code that cannot be typed using a Control
combination.

I pretend that only a few persons use the "erase on right" using my
experience as a university teacher for more than 35 years...


                        Olivier Lecarme




> When a user types a Backspace, and in the absence of any use of xmodmap,
> X sends the keysym Backspace. When a user types a Delete, X sends the
> keysym Delete. The problem is that too many programs have taken the
> habit to interpret Backspace as a Delete. Then, since there is a Delete
> key elsewhere on the keyboard (a real design mistake on this keyboard),
> why not interpret it in any other useful way ?

Huh? Interpret Backspace as a Delete? In all the programs I've seen
backspace does a backspace (or delete the character left of the cursor).
But then the programs are simply at fault right? They should interpret
Backspace as Backspace and Delete as Delete, and leave any mapping to
the user.
 
> In a non-graphic application, for example in a Telnet session or in a
> GNU Screen session, the Backspace key sends a C-h and the Delete key
> sends a DEL character, meant to erase the character on the left. This is
> independent of the position of these keys on the keyboard.

Oh, I see now. Apparently I'm too young to know that the original del as
in the ASCII DEL signal deletes the character on the left :). But what
is the difference between DEL (ASCII 127 iirc) and C-h (ascii 8) then?


> This would not break the Gimp, only it would mean that the few persons
> who know how to use the "erase on right" functionality would need to
> type a C-d like in Emacs, or to use xmodmap. Note that on the contrary,
> the DEL code is the only ASCII code that cannot be typed using a Control
> combination.
> 
> I pretend that only a few persons use the "erase on right" using my
> experience as a university teacher for more than 35 years...

Hmm, I happen to use the Delete key that is positioned above the left
arrow key on my pc keyboard quite a lot, in fact I use the entire
"cursor control" block (ie arrows and int/del/home/end/pgup/pgdn)
regularly, especially when programming and thus editing text with rather
random access patterns. But I suppose that as you say I'm an exception.

Still, if I understand correctly, there is a bit of a problem here with
programs not doing what they should do (ie interpreting things
correctly). And your suggestion thus restores the original, correct way
of doing things, while pc users who are used to a different,
non-standard behaviour, would only have to change their xmodmap. Sounds
very logical.

Now you only need to get them Gimp developers to make it so :). (I'm not
a real full-time developer, I'm just on the list because I fixed a bug
not so long ago)

Lourens


Reply via email to