bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: inconsistent bindings of backspace and delete between X and xterm


From: Andreas Schwab
Subject: Re: inconsistent bindings of backspace and delete between X and xterm
Date: Sat, 07 Feb 2004 15:38:03 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

Dale Hagglund <address@hidden> 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, address@hidden
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 via email to

[Prev in Thread] Current Thread [Next in Thread]