On Sun, 21 Nov 2010, Jilles Tjoelker wrote:

With the new "libteken" terminal emulator code in 9-current, syscons is
now much like xterm. It appears that Backspace is still ^H, but Delete
is now ^[[3~ instead of ^?.

That is a bug, but libteken in syscons mode doesn't have it.  Termios
only supports single characters as special characters, so mapping any
key to multiple characters breaks its use as a special character for
normal POSIX terminal input.  Loss of the special character ASCII DEL
would be especially large breakage since it is in common use as a special
character.  Some key should be mapped to it, and the old choice of the
Delete key is best.  Perhaps termios can support wide characters or
encoded characters for termios (cc_t can be any integral type), but
I've never seen that done, and cc_t is just unsigned char in FreeBSD.

A while ago, I changed 9-current libedit (and therefore programs like sh
and ftp) to recognize ^[[3~. I encourage you to ask tcsh upstream to fix
this as well (either by hardcoding ^[[3~ somewhere or by using the
appropriate termcap/terminfo field).

Editors not using normal terminal input can do this.  Some intentionally
put the keyboard in a special mode in which the keys return longer, unique
escape sequences so that they be reassigned.  I couldn't find the standard
termcap variable for this, but found the interesting variables S4 and S5
which switch between normal keyboard mode and "PC scancode mode" for SVr4
on PCs.

Making the Backspace key send ^? may be slightly dangerous as it is
rather annoying if Backspace does Delete (more annoying than Delete
doing Backspace, IMHO). On the other hand, vte-based terminal programs
such as gnome-terminal and xfce4's Terminal send ^? by default and it
seems to work fine.

ASCII DEL is still the default for VERASE.  Anyone still using that
would expect Delete to work as Backspace and be very annoyed if Delete
started returning CSI 3 ~.  IIRC, the first U[^H|^?]Xenix system that
I used had this (DEL for VERASE), and perhaps also ASCII Backspace for
VINTR.  Or it may just have had DEL for VINTR.  Certainly not the ^C
for VINTR that I was used to.  This took some getting used to.  After
a while I learned to use stty to map Backspace and ^C "normally" and
now rarely use Delete/DEL.

Bruce
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to