From: ra_novy@dal.mobil.com
Newsgroups: comp.sys.mac.misc
Subject: Re: X-WINDOWS??? Consider _eXodus_
Date: 2 Oct 1992 07:26:16 -0500
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu

[I tried to post this through ucbvax.berkeley.edu, but it never appeared on our
news server.  So here it is again.]

jkrage@wam.umd.edu (F. Joshua Krage) writes

[much deleted]

>HOWEVER, we did have one serious problem.  We're connecting to an IBM RS/6000
>running AIX 3.2, using aixterms for our terminals. (aixterms are, for the
>most part, enhanced xterms, with some twists)  aixterm (unlike xterm), expects
>a Delete key code (255) as opposed to a ^H (8) which is standard.  Standard
>tricks like stty didn't help, and we're not about to change our terminal
>settings across the entire system, and have to change every terminal.  
>Although eXodus comes with three keymaps (DEC, Mac, and custom), all map the
>backspace key to ASCII 8.  Unfortunately, unless you're willing to violate
>the licensing agreement, there is no solution.  However, those handy with 
>ResEdit can create their own solution by reversing some keycodes.

I too had problems with backspace/delete and aixterm on an IBM RS/6000.  I'm
using MacX, but the solution I found might work with eXodus as well (I have NO
experience with eXodus).  My delete key would be interpreted by aixterm as a
sequence of 3 (!) keys: ^[[P, i.e. escape, left bracket, P.  Wonderful, eh?

So here's an excerpt from a message I sent to someone else who was wondering
how to fix this problem.  It worked for him.

____________________

1)  In my MacX command for opening an aixterm window, I preceded the
call to aixterm with a call to xmodmap (a semicolon separates the two
commands):

     /usr/bin/X11/xmodmap -display "(R-in-circle)display" .xmodmaprc ;
     /usr/bin/X11/aixterm [options] &

So each time I start up an aixterm window, the key mapping is done
before the window is actually opened.

2) The file .xmodmaprc sits in my home directory on the RS/6000.  Here's a
copy of it.  Besides fixing the delete key, it also makes the numeric keypad
work as one would expect.
_________________________________________________________
!
! File to be read by xmodmap, which modifies keymaps in the X Server
!
! Make 'delete' key on Mac keyboard send BackSpace
! RISC interprets delete as ^[[P, i.e. escape left-bracket P (who knows why)
!  59 is the KeyCode for delete; this is what the delete key sends
!
keycode 59 = BackSpace
!
! Make numeric keypad work
!
keycode 60 = Return
keycode 73 = period
keycode 75 = asterisk
keycode 77 = plus
keycode 83 = slash
keycode 86 = minus
keycode 89 = equal
keycode 90 = 0
keycode 91 = 1
keycode 92 = 2
keycode 93 = 3
keycode 94 = 4
keycode 95 = 5
keycode 96 = 6
keycode 97 = 7
keycode 99 = 8
keycode 100 = 9
_________________________________________________________

You might want to look at the manual entry for xmodmap.  It's a really
neat facility for customizing your keyboard, but it takes some effort to
understand the terminology.


Bob Novy
ra_novy@dal.mobil.com
Dallas, TX

"Ross Perot is a hand grenade with a bad haircut."
                                       Rush Limbaugh
Newsgroups: comp.sys.mac.misc