unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@suse.de>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: inconsistent bindings of backspace and delete between X and xterm
Date: Sat, 07 Feb 2004 15:38:03 +0100	[thread overview]
Message-ID: <jewu6zuf90.fsf@sykes.suse.de> (raw)
In-Reply-To: <lmoesbef4e.fsf@dernhelm.edmonton.yottayotta.com> (Dale Hagglund's message of "Fri, 06 Feb 2004 20:35:13 -0700")

Dale Hagglund <rdh@yottayotta.com> writes:

> [I read bug-gnu-emacs via the gatewayed newsgroup.  Please cc me on
> any followups, if possible. --rdh]
>
> I was experimenting with emacs 21.3 running under X and then inside
> xterm, and I observe the following behaviour.  In all cases, I started
> emacs with the -q flag.
>
> 1. Under X, the backspace and delete keys generate the respective
>    window-system events, each of which is mapped to DEL via the
>    function-key-map, which is then bound to
>    `delete-previous-character'.
>
> 2. Under xterm version 4.2.99.903(174), backspace sends DEL and delete
>    sends `ESC [ 3 ~'.  Emacs treats DEL, of course, as
>    `delete-previous-character', but `ESC [ 3 ~' is mapped to the event
>    <deletechar>, which is bound to `delete-char'.
>
> This behaviour is inconsistent.  In each case, emacs can distinguish
> between the Delete and Backspace keys, but in one environment they
> behave, and in the other, differently.  Also, is there any reason why
> `ESC [ 3 ~' shouldn't be mapped to <delete> instead of <deletechar>.

This is a property of the terminal description.  For xterm it contains
`kdch1=\E[3~' (terminfo) or `kD=\E[3~' (termcap), thus `ESC [ 3 ~' is
mapped to <deletechar>.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2004-02-07 14:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-07  3:35 inconsistent bindings of backspace and delete between X and xterm Dale Hagglund
2004-02-07 14:38 ` Andreas Schwab [this message]
2004-02-07 17:35   ` Dale Hagglund
2004-02-07 18:45     ` Andreas Schwab
2004-02-08  0:32       ` Dale Hagglund
2004-02-08  6:03         ` Eli Zaretskii
2004-02-07 15:41 ` Eli Zaretskii
2004-02-07 15:56   ` Andreas Schwab
2004-02-07 17:27     ` Dale Hagglund
2004-02-07 18:40       ` Andreas Schwab
2004-02-07 17:21   ` Dale Hagglund
2004-02-11  0:13     ` Dale Hagglund
2004-02-11  6:57       ` Eli Zaretskii
2004-02-11 10:03         ` Dale Hagglund
     [not found] ` <mailman.2052.1076164878.928.bug-gnu-emacs@gnu.org>
2004-02-07 21:00   ` Thomas Dickey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jewu6zuf90.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).