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

Re: Bug#2313: xterm keymapping problems suspected

Stephen Early writes:
> I agree this is dodgy. I'll look into changing it; this will be done
> either by modifying the source code (which is awful), or by providing a
> default set of translations for the vt100 widget.

My system works fine with the following settings:

xterm*VT100.Translations:	#override \n\
	<Key>Delete:	string(0x1b) string("[3~")\n\
	<Key>Home:	string(0x1b) string("[1~")\n\
	<Key>End:	string(0x1b) string("[4~")\n\
	Ctrl<Key>Prior:	string(0x1b) string("[40~")\n\
	Ctrl<Key>Next:	string(0x1b) string("[41~")

Needless to say, I also use the following .Xmodmap:

keycode 22 = BackSpace

The only problem I have is tput installing different erase character
depending on the TERM entry. With TERM=linux erase is set to ^?, with
TERM=xterm erase is set to ^H.

However, I think we should let ^H alone, just ask the emacs users. :-)

> There are (at least) two problems here. At least on my system, the
> backspace key and the various delete keys all end up with the 'Delete'
> keysym. It's possible to remap the backspace key to have a BackSpace
> keysym using the following command, at least on UK and US keyboards:
> xmodmap -e "keycode 22 = BackSpace"

It works on German keyboards, too.

> This, as expected, makes xterm produce ^H whenever backspace is pressed.

Well, not exactly. I do get ^? whenever pressing backspace despite using the
same entry in my .Xmodmap file. Maybe we have different settings on teh
console. I use

keycode  14 = Delete           Delete          

in my de.map file. Do you have set key 14 to BackSpace?

> I agree that this behaviour is more correct, but it can be annoying;

I do not.

> although readline treats ^H and ^? the same by default, the kernel tty
> driver doesn't, and only allows one 'rubout' key. This can lead to things
> like this:
> myrddin:~$ cat
> gggg^H^Hs
> ggsg

Setting stty erase ^H or tset -e ^H makes the key work correctly I think.

> ...
> I'm open to suggestions about what the Debian X packages should do here.
> My personal feeling is that giving the backspace key the BackSpace keysym
> and the delete keys the Delete keysym is the right way to go. I'm not too
> sure how to accomplish this; in particular I don't want to have any
> hard-coded keycodes in the packages, even in the sample config files. It
> may work for all of us, with our US or UK standard keyboards, but people
> using other keyboards could have problems.
> I also want to know how people feel about backspace producing ^H in an
> xterm by default; this will be 'new' behaviour for most Linux users I think.

As mentioned above I think we first of all have to find a solution that
always deletes the character to the left when pressing backspace and the
actual character when pressing delete. With some experiences with other
Unix systems I prefer ^? to be BackSpace and ^H be ^H and not more.


Michael Meskes 
Lehrstuhl fuer angewandte Mathematik insb. Informatik
RWTH-Aachen, D-52056 Aachen, Germany
email: meskes@informatik.rwth-aachen.de

Reply to: