[comp.emacs] Rebinding M-space and C-space on an IBM HFT

aks@nowhere.ucsb.edu (Alan Stebbens) (11/08/90)

I have finally figured out how to make the "Backspace" key produce the usual
"\177" character which Emacs and all the other software I use expects.  I am
now trying to figure out how to make C-<space> and M-<space> produce values
which Emacs (via an X aixterm client) can deal with.  

Does anyone have some suggestions?  As usual, direct replies will be 
eventually summarized in a later posting.

For those who want to know how I did the first, the approach was two fold:

(a) make a new keymapping from the sample in /usr/lpp/hft/samples/swkbd_map.c
    by replacing the Backspace value with a Delete value for the key at
    position 15.  Compile and run the program, which creates a file called:
    "sample" (if you change the name of the file, be sure to change the ASCII
    characters in the structure to match the name you want to call the new
    map.  Install the new keymap in the /usr/lpp/swkbds directory.  Add the
    new keymap to the system via SMIT HFT.  This takes care of the ASCII 
    virtual terminal.

(b) add the following line to ~/.Xkeyboard (which is fed to "xmodmap"):
	clear Control
	clear Lock 
	keysym BackSpace = Delete
	add Control = Caps_Lock
	add Lock = Control_L

    add the following line to .Xdefaults (which is fed to "xrdb -merge"):

    aixterm*translations: #override <Key>Delete = string("\177")

The .Xkeyboard stuff swaps the Caps_Lock and Control keys, which makes
them where *I* prefer them; the "keysym ..." statement make the
BackSpace keycode produce a "Delete" value (which is 0xFFFF) by default
in X. Since the "Backspace" key now procudes a "Delete" value, the
latter change in .Xdefaults is also required to get the Delete key to do 
the customary 0x7F value. 

My problem is that I don't know how to make X remap the Control or Meta
keymaps.  I am still scanning TFM.  Does anyone know how?

I tried changing the keymaps from the "sample" file but the changes do
not seem to take effect once the X server is running.  I am coming to
the believe that I have to change /usr/include/X11/keysymdef.h or
something like that and rebuild the X server. 

Am I the only one who wants to run Emacs seemlessly on an RS6000?  Has 
someone already done things (albeit differently) like this?

Thanks for any help.

Alan Stebbens        <aks@hub.ucsb.edu>             (805) 893-3221
     Center for Computational Sciences and Engineering (CCSE)
          University of California, Santa Barbara (UCSB)
           3111 Engineering I, Santa Barbara, CA 93106
--

Alan Stebbens <aks@hub.ucsb.edu>

slh@wolf.cs.washington.edu (Scott Heyano) (11/09/90)

	If you are running emacs in a separate window,
	you can start that aixterm in vt100 mode (aixterm -v).
	Since vt100's send NUL for C-<space> this gives what you want.