Re: use of the Delete key on Dec keyboard or similar
Okay, now if I understand all this correctly, keyboards (and computers) did not have a delete-to-the-right key or keycode. Indeed, www.asciitable.com shows ascii 8 as Backspace and ascii 127 as DEL. If DEL is interpreted as delete-to-the-left, then we have two codes that mean the same, and no code for delete-to-the-right, correct? More or less. More precisely, we have two codes which were used differently in two different traditions: The old tradition: Delete for delete-to-the-left, and no key for delete-to-the-right. PC: Backspace for delete-to-the-left, and Delete for delete-to-the-right. Given these conflicting traditions, there are two approaches that could be reasonable in theory: * Tell everyone "you must remap Delete as Backspace if you have a keyboard whose big key is Delete." At some point this might be the best thing to do, but it is somewhat arrogant to tell a lot of users "You must remap your keyboards to use our software", and unless they have come to regard it as justified, they are likely to get quite angry. * Make applications handle both Backspace and Delete as delete-to-the-left, and use some other gesture for delete-to-the-right. This way, we can give the users a simple uniform recommendation that works reasonably well on all keyboards. It is reasonable for a program to offer an option to use the PC meanings--in other words, to make Delete delete to the right. Emacs has such an option. Maybe GTK should have such an option too. Now where did that C-d come from? C-d is the Emacs key binding for delete-to-the-right. This was not an inevitable choice; some other key binding could have been chosen. But this one has the advantage that "d" is mnemonic for "delete". I don't see why Emacs would be a better "standard" to model program behaviour after than the "standard" PC way of doing things. Emacs is an important part of the GNU system, and other GNU programs (notably BASH) provide compatible key bindings. Even many non-GNU programs support Emacs key bindings. So it is very useful for any GNU program to provide Emacs-compatible bindings, if they fit in the program. It sounds like this is really a GTK issue, not specifically a GIMP issue, so I should raise the issue with the GTK developers. Thanks.
Re: [gimp-devel] Re: use of the Delete key on Dec keyboard or similar
Richard Stallman ([EMAIL PROTECTED]) wrote: Gimp developers, I asked Olivier to report this because it is a serious (though superficial) problem. Since the Gimp only runs under a window system, it should be able to handle both Backspace and Delete in the same way (as delete-backwards), since both of them can be distinguished from the ASCII characters C-h and DEL. One Question: Where in Gimp is the handling of the Backspace/Delete Keys wrong? Probably in the GTK+-Widgets. So isn't this a general GTK+-Problem and should be discussed there? Bye, Simon -- [EMAIL PROTECTED] http://www.home.unix-ag.org/simon/
Re: use of the Delete key on Dec keyboard or similar
Olivier Lecarme [EMAIL PROTECTED] writes: 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) GIMP does not do anything about key mappings and it will never do. Configure your X-Server correctly and you're done. Salut, Sven
Re: use of the Delete key on Dec keyboard or similar
SN GIMP does not do anything about key mappings and it will never do. SN Configure your X-Server correctly and you're done. I would like to make it clear that I do know how to use xmodmap or other X tools. This is NOT a problem of configuring my X server: the Delete key on my keyboard sends a Delete keysym, and I have no reason to change it in order to send a Backspace, especially because this would break most other tools. Although the PC keyboard is by far the dominant keyboard in the world, it is a design mistake to have put a large Backspace key in place of the Delete key of all the preceding keyboards (note that computers and keyboards existed before the advent of the PC). In order to correct this design mistake, programs like Emacs have interpreted the Backspace keysym as a DEL for years, knowing that the Backspace character can always be typed as a C-h, and that users are accustomed to erase on right using a C-d. However, this has the inconvenience that in the non-window case, the Backspace key sends a C-h, which is interpreted as a call for help. For programs designed after the PC has begun to be the dominant computer, most implementors have taken as granted that a Backspace key is meant to erase on left, and a Delete key is meant to erase on right. This was the simplest solution for them, but it is fundamentally wrong. I have the feeling to preach in the desert when I try to convince people of that, but at least they should try to understand the problem, and even try to find a solution which would work for everybody. Olivier Lecarme
Re: [gimp-devel] Re: use of the Delete key on Dec keyboard or similar
Olivier Lecarme ([EMAIL PROTECTED]) wrote: For programs designed after the PC has begun to be the dominant computer, most implementors have taken as granted that a Backspace key is meant to erase on left, and a Delete key is meant to erase on right. This was the simplest solution for them, but it is fundamentally wrong. I have the feeling to preach in the desert when I try to convince people of that, but at least they should try to understand the problem, and even try to find a solution which would work for everybody. Ok, Ill give it a try. Please specify, where in Gimp you notice the wrong behaviour. I cannot check this, since every Keyboard I have access to is a PC-Style Keyboard, where the X-Server maps the Key above the Return Key to the "BackSpace" Keysym and the key to the right of the return key to the "Delete" Keysym (as reported by xev, this is a SuSE-Linux right now) In an XTerm The "BackSpace"-Keysym deletes the character to the left of the cursor and moves the cursor one position to the left. The "Delete"-Keysym deletes the character under the cursor and does not change the cursor position. In both cases the text to the right of the cursor is moved one position to the left. In a randomly chosen Text-Entry field in the Gimp the behaviour is the same (but the cursor is a vertical line between two chars). So what exactly is the Problem? Bye, Simon -- [EMAIL PROTECTED] http://www.home.unix-ag.org/simon/
Re: use of the Delete key on Dec keyboard or similar
Olivier Lecarme wrote: [snip] Although the PC keyboard is by far the dominant keyboard in the world, it is a design mistake to have put a large Backspace key in place of the Delete key of all the preceding keyboards (note that computers and keyboards existed before the advent of the PC). Okay, now if I understand all this correctly, keyboards (and computers) did not have a delete-to-the-right key or keycode. Indeed, www.asciitable.com shows ascii 8 as Backspace and ascii 127 as DEL. If DEL is interpreted as delete-to-the-left, then we have two codes that mean the same, and no code for delete-to-the-right, correct? In order to correct this design mistake, programs like Emacs have interpreted the Backspace keysym as a DEL for years, knowing that the Backspace character can always be typed as a C-h, and that users are accustomed to erase on right using a C-d. However, this has the inconvenience that in the non-window case, the Backspace key sends a C-h, which is interpreted as a call for help. Now where did that C-d come from? Again, according to www.asciitable.com C-d or ascii 4, is EOT or end of transmission, not any form of erase. And I bet interpreting C-h as help is not something standard either (since ascii 8 is Backspace, nothing to do with help). I don't see why Emacs would be a better "standard" to model program behaviour after than the "standard" PC way of doing things. For programs designed after the PC has begun to be the dominant computer, most implementors have taken as granted that a Backspace key is meant to erase on left, and a Delete key is meant to erase on right. This was the simplest solution for them, but it is fundamentally wrong. I have the feeling to preach in the desert when I try to convince people of that, but at least they should try to understand the problem, and even try to find a solution which would work for everybody. Okay, so an error was made. The makers of the pc keyboard should have left the DEL key where it was, and added a delete-to-the-right button in the place where we have delete buttons now. It seems that that brings us to a deadlock. Implementing programs using the old definition would mean making Delete delete-to-the-left, and Backspace also delete-to-the-left (since making it delete-to-the-right weuld be rather unlogical). For people using old-style keyboards like Msr. Lecarme, that would solve all problems, and it would also be consistent historically. However, this leaves us without a key (or keysym) for delete-to-the-right, thereby making supporting the pc standard impossible, even tweaking the xmodmap wouldn't work. The only solution for good default behaviour I can come up with is a rather weird one. We'd have to interpret the Delete keysym as delete-to-the-left, and Backspace as delete-to-the-right. As I said before, this is highly illogical, but it's, as far as I can see, the only solution that would support both original keyboards (automatically, Delete works correctly and there is no Backspace key) and PC style keyboards (the keys would have to be swapped in the xmodmap). The problem with this is that changing the behaviour in gimp (or GTK, since I agree that this would be more of a GTK problem) would "break" it on every PC out there, so that all users would have to change their Xmodmap, thereby breaking other programs that depend on Backspace being delete-to-the-left and Delete being delete-to-the-right. Having written that, I think that there is one solution left. Make a config option in GTK that allows Delete being interpreted as delete-to-the-left. I have no experience whatsoever with GTK hacking but I don't think it should be that hard to implement. People who prefer PC style behaviour would leave the switch to off, while Msr. Lecarme would turn it on and make his Delete key work appropriately according to his standard. And Simon: All true, so it conforms to the PC standard. As far as I understand now (and I think I understand the problem) the Delete keysym should actually delete to the left (ie behave like Backspace) Lourens Veen
Re: use of the Delete key on Dec keyboard or similar
I still do the majority of my work on Linux in terminal windows. It loooks like you're referring to the GNU/Linux operating system, rather than the Linux kernel; if so, would you please write "GNU/Linux"? The GNU Project needs to get credit for the developing the GNU system, since this helps us do more of everything we try to do (including the Gimp). So it is a GNU convention that we should call the system GNU/Linux, the combination of GNU and Linux. That gives us a share of the credit, while still giving Linus Torvalds a share as well. See http://www.gnu.org/gnu/linux-and-gnu.html for more explanation.
use of the Delete key on Dec keyboard or similar
Dear sirs, I'm using various keyboards, among which several have the layout that was the customary one before the advent of the ubiquitous PC keyboard. I.e., the key in the upper-right part of the main keyboard is the Delete key (key value 127, key symbol Delete). There is no Backspace key on these keyboards, and this is not really absurd, since a back space means something mainly on a printing terminal, not on a graphic one. You can find this layout on the Digital LK keyboards, the NCD N108 and vt220 keyboards, the Sun type 4, the Tektronix XN11, etc. It is also the layout of all alphanumeric terminals derived from the celebrated VT100. 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
Re: use of the Delete key on Dec keyboard or similar
Olivier Lecarme said... | |The problem is that the Gimp considers that the key in this position is |always a Backspace, I'm assuming you are using the X Window system and a UNIX variant, based on the systems you mentioned. If so, the issue is probably not the GIMP, since it doesn't know anything about which keys are in which "positions". It knows about keycodes, which are mapped to individual keys by the X11 server. Your server has some key mapped as the backspace key. The GIMP simply uses whatever your X11 server thinks is the backspace key. If there's a way to easily customize this in the GIMP, I don't recall it. You can get a program called (I think) xkeyboard that wil let you easily determine and reconfigure your keyboard mapping. If you can't find that, you'll need to run xevent from a terminal window, press the key in question inside the window that pops up, look in the terminal window to see what keycode was generated, then use xmodmap to change the mapping. | 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. Actually, this is the normal behavior for text handling on almost every program I've ever used. -Miles
Re: use of the Delete key on Dec keyboard or similar
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
Re: use of the Delete key on Dec keyboard or similar
Thanks for sending the report. Gimp developers, I asked Olivier to report this because it is a serious (though superficial) problem. Since the Gimp only runs under a window system, it should be able to handle both Backspace and Delete in the same way (as delete-backwards), since both of them can be distinguished from the ASCII characters C-h and DEL.
Re: use of the Delete key on Dec keyboard or similar
Right, but then there's another problem (at least for me). How would I change my Xmodmap so that gimp will do a delete-forward when I press my delete key? There would have to be at least one X key message that gets interpreted as such, otherwise modifying Xmodmap to get the old behaviour back would be impossible. I appreciate that on text terminals it's unavailable, simply because it does not make sense, but that does not mean that windowing systems should remain without delete-forward. It's the common way of doing things, and even if in theory it is wrong then one should ask whether to change the standard, try to change practice, or simply supporting both. Lourens Veen Richard Stallman wrote: Thanks for sending the report. Gimp developers, I asked Olivier to report this because it is a serious (though superficial) problem. Since the Gimp only runs under a window system, it should be able to handle both Backspace and Delete in the same way (as delete-backwards), since both of them can be distinguished from the ASCII characters C-h and DEL.
Re: use of the Delete key on Dec keyboard or similar
Lourens Veen said... | |Right, but then there's another problem (at least for me). How would I |change my Xmodmap so that gimp will do a delete-forward when I press my |delete key? There would have to be at least one X key message that gets |interpreted as such, otherwise modifying Xmodmap to get the old |behaviour back would be impossible. I completely agree. |I appreciate that on text terminals it's unavailable, simply because it |does not make sense, but that does not mean that windowing systems |should remain without delete-forward. It's the common way of doing |things, and even if in theory it is wrong then one should ask whether to |change the standard, try to change practice, or simply supporting both. Absolutely. And there are gazillions of people who *expect* to have both delete-forward and delete-backward supported, usually handled by (surprise!) Delete and Backspace. And since the GIMP is pretty useless in a test terminal only world, I don't see text terminal stuff mattering. And the fact is, I worked on text terminals for years before graphics wree common. I still do the majority of my work on Linux in terminal windows. And I wanted both delete-forward and delete-backwards based on rational keys (like Delete and Backspace) even back then. It's real handy with editors. The whole world isn't emacs. -Miles