[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how do you swap key definitions?



    Date: Tue 25 Sep 84 21:08:30-EDT
    From: Steve Strassmann <STRAZ%MIT-OZ at MIT-MC.ARPA>
    To:   bug-emacs%MIT-OZ at MIT-MC.ARPA
    Re:   how do you swap key definitions?

    I and several others are now using a DEC pro 350 (blechhh) running as
    a vt100 to connect to OZ, but the keyboard has a particularly brain-damaged 
    layout. How can I set up in an LOGIN.CMD (well, EMACS.VARS, I bet)
    the magic which swaps back-quote and ESC. It would be nice to only do
    this conditionally (as we DO use normal terminals occasionally), and
    even better if this swapping could be done at exec for all of tops20,
    instead of just babyl/emacs. Thanks,
    -steve

This sounds like a marginal idea, but as long as you have experienced
users only it sounds ok.  Just try explaining to a new user that you type
backquote which is like escape which is the command prefix for meta keys
which this keyboard doesn't have...

Unfortunately, however, it's not easy to do.  You could change the
definition of escape to insert a backquote and change backquote to be the
^R Prefix Meta.  You could also change Search Exit Char to backquote, but
it wouldn't do any good since I-Search seems to think it has to be a
control key instead of looking at the definition of the key.

Also, anywhere else that wants an escape (like babyl, teco minibuffers for
M-%, etc) won't work.  It's just hardwired in in too many places.

I'd think it would be easier to get the source for the terminal emulator
for the 350 (or write a new one) which swaps the key definitions at the
machine.  Then maybe you can swap keycaps, too.

Unless someone wants to hack this into the exec like they did 
ter reverse (delete and underscore characters).