[gnu.emacs] Xkeymap.txt

jockc@attctc.Dallas.TX.US (Jock Cooper) (02/02/90)

I was dismayed to find that when I run emacs in an X window, all my
nifty DECterm keyboard tricks go away.  (ie  I want `~ to send ESC, 
<> to send `~, and shift-. and shift-, to send < and >...)
I noticed a file in emacs/lib/etc called Xkeymap.txt that would seem to
be a way to do the same key redef for emacs, but I could find no other
info besides the file itself.   Any clues?


Jock Cooper
uunet!hammer!jockc

max@shodha.dec.com (Max McClanahan) (02/09/90)

>I was dismayed to find that when I run emacs in an X window, all my
>nifty DECterm keyboard tricks go away.  (ie  I want `~ to send ESC,
><> to send `~, and shift-. and shift-, to send < and >...)
>I noticed a file in emacs/lib/etc called Xkeymap.txt that would seem to
>be a way to do the same key redef for emacs, but I could find no other
>info besides the file itself.   Any clues?

I have never used Xkeymap myself.  Someone can correct me if I am
wrong, but I believe Xkeymap is input to keycomp, an X10 utility.

What I use is xmodmap.  I put the following command as the first line
in my .X11Startup:

    xmodmap  ~/dw/xmodmaprc

Where ~/dw/xmomaprc is a file that contains the following:

    ! make f11 a real f11, not esc
    keycode 113 = F11
    ! make '~ key send esc
    keycode 191 = 0x1b
    ! make <> key send `~
    keycode 201 = quoteleft asciitilde
    ! change ,, to ,<
    keysym comma = comma less
    ! change .. to .>
    keysym period = period greater

Note that this will affect your DECterm windows as well as your X
windows.  In other words, you will want to turn off any DECterm
mapping if you use xmodmap.  Otherwise you get double mapping and it
becomes difficult to track down which key does what.