Garl Grigsby wrote:

> I have run into a problem I am not sure how to fix. When I log into
> another unix box (Solaris, HP-UX, AIX, IRIX) from my linux box and try
> to use the Backspace key, I get a '^?' instead of deleting the previous
> character. Now I am aware that I can use stty to reset erase to be '^?',
> but this will not really solve the problem. All of the other unix
> flavors I am working with use '^H' for a backspace. So to get this to
> work, I would need to determine what type of system I am working on and
> set erase that way, if I want to do this from my .profile. Anybody have
> any better ideas on how to do this? I am assuming that this has
> something to do with the keymap that the linux box is using but, I am
> not sure how to correct this.... Please help....

You can fix it at the X server level by using xmodmap.  On a standard
PC keyboard, backspace is keycode 22(*), so create ~/.Xmodmap and add
this line to it.

        keycode 22 = BackSpace

In /usr/X11R6/X11/xdm/Xsession, there should be code that invokes
xmodmap for you if you have a .Xmodmap.

        usermodmap=$HOME/.Xmodmap 
        ...
        if [ -f $usermodmap ]; then 
            xmodmap $usermodmap 
        fi 

If you don't have that, or if you don't start X through xdm (or kdm),
then add the snipped above to your .xinitrc or .Xsession or whatever
script runs when you use to start the X server.

* If you don't have a standard PC keyboard, run xev to see what
keycode the backspace prints.  You'll see a bunch of garbage scroll
by, and when you press BackSpace, you'll see a KeyPress event like
this.

KeyPress event, serial 30, synthetic NO, window 0x1dc00001,
    root 0x26, subw 0x1dc00002, time 4213933842, (42,54),
    root:(1155,891),
    state 0x0, keycode 22 (keysym 0xff08, BackSpace), same_screen YES,
    XLookupString gives 1 characters:  "

On the fourth line, it says "keycode 22".

-- 
Bob Miller                              K<bob>
kbobsoft software consulting
http://kbobsoft.com                     [EMAIL PROTECTED]

Reply via email to