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

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

Re: Emacs reads both DEL and Backspace as DEL


From: Greg Hill
Subject: Re: Emacs reads both DEL and Backspace as DEL
Date: Thu, 23 Jan 2003 12:24:49 -0800

At 4:29 PM +0000 1/23/03, Ivan A. Uemlianin wrote:
Dear All

I'm running GNU emacs 20.7 on Debian GNU/Linux 3.0

I'm just in the process of writin ga little ~/.emacs file. I haven't been able to find the system default init file (not in /usr/share/emacs or /etc/default), but I wanted to have some different settings.

One change I wanted was to have the '<X|' key (Backspace?) as delete-backward-char and 'Delete' (DEL) as delete-char. However, my emacs reads both of these keys as DEL (detectable with M-x describe-key).

Virtual consoles and other apps treat the keys differently, so I know the issue is with emacs (and not eg the keyboard).

Does anyone have any clues as to what's happening, and what I can do to change it?

On my platform, (Unix, on a Sun, using eXodus on a MAC (OS-9) as my terminal), I have to put the following into my shell login script:

  xmodmap -e "keycode 188 = BackSpace"

I used a program called xev to find out what the keycode was (188) for the key that I wanted to use as BackSpace. If I didn't use xmodmap to change it, it was assigned the same keysym, "Delete", as the key I use for delete-char, whose keycode is 48.

I also have the following in my .emacs:

  (global-set-key [delete] 'delete-char)

after which describe-key starts identifying that key (keycode = 48) as "delete" instead of "DEL", although it continues to identify the other 'delete' key (keycode=188) as "DEL".

I also tried globally binding [backspace] to 'delete-backward-char, after which describe-key started indentifying the 188-key as "backspace" instead of as "DEL". But that had the undesirable side-effect of interfering with the automatic re-binding of that key for certain major modes; so I just don't rebind [backspace] and everything works the way I like.

Due to differences in our platforms, the details may be a bit different for you. But perhaps this will help you figure out what you need to do.

Good luck.

--Greg




reply via email to

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