*BSD News Article 92016


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!dispatch.news.demon.net!demon!erlenstar.demon.co.uk!erlenstar.demon.co.uk!not-for-mail
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Backspace = ^H
Date: 26 Mar 1997 21:06:47 +0000
Organization: disorganised
Message-ID: <8767yepdlk.fsf@erlenstar.demon.co.uk>
References: <5h2c01$4i2@reader.seed.net.tw> <5h6e83$1mk@ui-gate.utell.co.uk>
	<E7KvDC.ILE@nemesis.lonestar.org> <5h8905$lj1@ui-gate.utell.co.uk>
	<87g1xkqe8d.fsf@erlenstar.demon.co.uk> <5h9m3l$1ih@gurney.zeta.org.au>
NNTP-Posting-Host: localhost
X-NNTP-Posting-Host: erlenstar.demon.co.uk
Cc: reilly@zeta.org.au
X-Mayan-Date: Long count = 12.19.4.0.9; tzolkin = 12 Muluc; haab = 12 Cumku
X-Attribution: AG
X-Newsreader: Gnus v5.3/Emacs 19.34
Lines: 39
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:37789

>>>>> "Andrew" == Andrew Reilly <andrew@gurney.zeta.org.au> writes:

 Andrew> Yes, but which escape sequence, and how do you do that?

 Andrew> I've discovered that using xmodmap to make the "<-" key
 Andrew> return "Delete" makes emacs happy, but Netscape and other
 Andrew> Motif-style applications insist on "BackSpace".  So what's
 Andrew> one to do?

Here's what I did:

  - modified the keyboard tables so that "<--" generates 0x7f, shift-"<--"
    generates 0x08, and "Delete" generates \E[K (a fairly arbitrary choice,
    but there seemed to be little logic in the other key assignments)

  - modified the cons25 termcap (actually, I created a new cons25x entry, and
    made all the console screens use it) to have kb=\177 and kD=\E[K

  - made Emacs bind the "Delete" keysym to [deletechar] in function-key-map
    rather than to [DEL] (and removed the ascii-character property from 
    the Delete keysym)

  - set the following X resources:

*VT100.Translations: #override <Key>BackSpace:string(0x7F) \n\
			       <Key>Delete:string("\033[3~") \n\
			       <Key>Home:string("\033[1~") \n\
			       <Key>End:string("\033[4~")

I think that was all. (I may have diddled with the xterm termcap, I'm not
sure.) Emacs is happy (whether on the text console, X or in an xterm);
Netscape is happy; everything else I've tried is happy.

This is on 2.1.6 (which I will upgrade to 2.2 as soon as I am sure that the
damned thing will stay on the FTP servers long enough for me to download it)
using Emacs 19.34.

-- 
Andrew.