unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Greg Hill <ghill@synergymicro.com>
Subject: Re: Emacs reads both DEL and Backspace as DEL
Date: Thu, 23 Jan 2003 12:24:49 -0800	[thread overview]
Message-ID: <p04310101ba55f7a615da@[198.17.100.22]> (raw)
In-Reply-To: <3E301870.9040904@jurakm.com>

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	other threads:[~2003-01-23 20:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-23 16:29 Emacs reads both DEL and Backspace as DEL Ivan A. Uemlianin
2003-01-23 20:24 ` Greg Hill [this message]
2003-02-02 20:44   ` Roberto Huelga
     [not found] <mailman.874.1043340417.21513.help-gnu-emacs@gnu.org>
2003-01-24 12:38 ` Kai Großjohann
2003-01-24 16:42   ` Ivan Uemlianin
     [not found]   ` <mailman.931.1043427548.21513.help-gnu-emacs@gnu.org>
2003-01-28  1:18     ` Dan Kalikow
2003-01-28  6:23       ` Eli Zaretskii
     [not found] <mailman.1323.1044218808.21513.help-gnu-emacs@gnu.org>
2003-02-03 16:05 ` Stefan Monnier <foo@acm.com>

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='p04310101ba55f7a615da@[198.17.100.22]' \
    --to=ghill@synergymicro.com \
    /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.
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).