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

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

%% Isaac To <kkto@csis.hku.hk> writes:

  >>>>>> "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.

  it> Who say it "should be" ^H?

I do.

I've been using UNIX for 18 years.  I've used X for much of that time.
I've even used actual vt100 terminals (although it was very long ago).
I've worked on everything from Ultrix to DG-UX to Solaris to Linux and
many more in between.

Pressing the backspace key in all these systems generates a ^H
character.  The delete key generates ^?.  Except Linux, now.

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

I know all about this issue; I've used Emacs for 14+ years.  But, I want
to know how to make backspace send ^H.

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

So, should I submit bugs against Solaris, HP-UX, AIX, etc. etc. so that
when I telnet to those systems from my Linux box my keybindings work
properly, more/less work properly, vi works properly, etc. (luckily I
use bash as my shell which has the very sensible behavior of treating
backspace and DEL identically)?

I think not.  Linux is in the minority here and my preference is to
change Linux to work the "traditional" way rather than customize all the

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

  it> The BackSpace keysym is a keysym, not a keycode.

Yes, that's why I said "keycode 22" and "the backspace keysym".

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

I don't understand this at all... the keycode for backspace is 22, not
^?, and xmodmap -pke doesn't generate output in quotes.

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

  it> It "always" used to send DEL, unless your configuration is wrong.
  it> The "always" means something that is back as far as around the
  it> "bo" (i.e., Debian 1.3) days.  Now it is probably time to fix your
  it> stty so that it accepts ^? rather than ^H.

I don't want to do that.  I want to change my settings back to what they
were up until a month or two ago.  I use many different system types
and, as I said above, it's far simpler for me to change Linux back to
work like all the others than it is to try to change all those other
systems and applications to work like Linux.

  it> There is an exception.  Until recently, the gnome-terminal
  it> incorrectly sends ^H rather than DEL on receiving BackSpace

I've never used gnome-terminal.  I use rxvt almost exclusively.  Maybe a
few xterms by accident.

So, something changed in the rxvt/xterm builds?  I checked all the
app-defaults and couldn't find anything.  Do I have to recompile them


 Paul D. Smith <pausmith@nortelnetworks.com> HASMAT--HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
   These are my opinions---Nortel Networks takes no responsibility for them.

Reply to: