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

Re: BS changed to give ^? instead of ^H?



>>>>> "Paul" == Paul Smith <pausmith@nortelnetworks.com> writes:

    Paul> If I use bash and C-q BS, or emacs -q -nw to start it within the
    Paul> terminal and use C-q BS, it shows that they key typed is ^? and
    Paul> not ^H as it should be.

Who say it "should be" ^H?  Even the default text console will give you ^?
rather than ^H when you press backspace.  In Emacs, ^H is a prefix character
for "help" rather than binding to "delete-backward-char".  If the ^H binding
is made to X terminal programs, Emacs users will find that pressing
backspace leave them a prompt asking for a key to specify what help he want,
rather than deleting one character on the left of the cursor.

If any environment by default sends ^H rather than DEL (i.e., ^?) when you
press BackSpace, then you have to file bug against that environment.  The
only one that this won't work is the one that you have no capability to file
a bug against (i.e., MS-Windows...).

BTW, the Del key sends the delete sequence in most terminal emulator, i.e.,
<Esc> [ 3 ~ (if you use an ANSI compatible terminal-type).

    Paul> Looking at xmodmap -pke shows that keycode 22 emits backspace, and
    Paul> xev shows that the BS key is sending the backspace keysym.

The BackSpace keysym is a keysym, not a keycode.  If you look down, you'll
find that the keycode is said to be '"'.  Of course, this is not really the
case.  It actually want to say the keycode is ^?, and enclose it between
double quotes.  But the ^? actually deletes the leading double quote.

    Paul> Where should I look for the cause of this?  I need BS to give ^H,
    Paul> like it always used to do.

It "always" used to send DEL, unless your configuration is wrong.  The
"always" means something that is back as far as around the "bo" (i.e.,
Debian 1.3) days.  Now it is probably time to fix your stty so that it
accepts ^? rather than ^H.  (Just "stty sane" will actually do the trick if
you are confronted in such a misconfigured environment.)

There is an exception.  Until recently, the gnome-terminal incorrectly sends
^H rather than DEL on receiving BackSpace.  If you want to get back the
broken environment, you can go to the Profile menu, go to compatibility
menu, and say you want BS instead of DEL when BackSpace is pressed, and
"enjoy" the brokenness of Emacs now.

Regards,
Isaac.



Reply to: