[comp.sys.dec] keyboard remapping on DECstation 3100

iho@cac.washington.edu (Il Oh) (02/22/91)

I have a DECstation 3100.  I really hate the placement of the < and >
keys.  I can remap them when I use dxterm with the "customize" option,
but not with other X clients.  Is there a way to do this remapping with
other X clients?  Better yet, is there a way to do this remapping
globally for all applications running on it?
--
 "I'm sorry.                            |    Il Hwan Oh
  If you were right,                    |    University of Washington, Tacoma
  I would agree with you."              |    iho@cac.washington.edu
   -- Dr. Malcolm Sayer, _Awakenings_   |

jtkohl@MIT.EDU (John T Kohl) (02/22/91)

In article <16896@milton.u.washington.edu> iho@cac.washington.edu (Il Oh) writes:

> I have a DECstation 3100.  I really hate the placement of the < and >
> keys. ... Better yet, is there a way to do this remapping
> globally for all applications running on it?

yes.  This is the file I use daily (on an X11R4 server, but should work
fine with DECwindows):

!	$Source: /afs/athena.mit.edu/user/j/jtkohl/lib/X11/RCS/Xmodmap,v $
!	$Author: jtkohl $
!	$Header: /afs/athena.mit.edu/user/j/jtkohl/lib/X11/RCS/Xmodmap,v 1.9 89/12/19 09:41:10 jtkohl Exp Locker: jtkohl $
!
! To use this file: /lib/cpp -P < thisfilename | xmodmap -
!
#ifdef i386
! assume losing PS/2 unix
keysym BackSpace = Delete
#endif
! Make the caps lock key a control key.  Otherwise, it gets in the way.
clear Lock
add Control = Caps_Lock
!
! Define F1 on the LK201 to be the escape key, and F9 on the RT to be
! the escape key.  This provides "finger macro" compatibility between the
! keyboards. 
#if defined(vax) || defined(mips)
! 86 is the F1 key on the LK201
keycode 86 = Escape
! 177 is the Compose Character key on the LK201
! this is needed to insure that it's really a meta key
keycode 177 = Meta_L
keysym comma = comma less
keysym period = period greater
#endif
#ifdef ibm032
! 71 is the F9 key on the RT
keycode 71 = Escape
#endif
--
John Kohl <jtkohl@ATHENA.MIT.EDU> or <jtkohl@MIT.EDU>
Digital Equipment Corporation/Project Athena
(The above opinions are MINE.  Don't put my words in somebody else's mouth!)

jv@mh.nl (Johan Vromans) (02/23/91)

In article <16896@milton.u.washington.edu> iho@cac.washington.edu (Il Oh) writes:

   I have a DECstation 3100.  I really hate the placement of the < and >
   keys.  I can remap them when I use dxterm with the "customize" option,
   but not with other X clients.  Is there a way to do this remapping with
   other X clients?  Better yet, is there a way to do this remapping
   globally for all applications running on it?

Yes. The answer is "xmodmap". It is on the Supported Subsets tape, in
subset UDXUNMIT400 (unsupported MIT X11 clients).

Create a file, e.g. ".keymap", in your $HOME directory, and call
xmodmap once, from your .X11Startup:

   xmodmap .keymap

IMPORTANT: Cancel any remapping you have configured in DXterm, since
this remapping takes place on the xmodmap remapped keys. You get some
kind of doubly remapped keys...

This is my .keymap file. It also takes care of the Escape key.

================ start of .keymap ================
! make sure the common functions work
keycode 113 = F11
! [~`] -> ESC and ~
keycode 191 = Escape asciitilde
! [<>] -> [`~]
keycode 201 = quoteleft asciitilde
! [,,] -> [,<]
keycode 232 = comma less
! [..] -> [.>]
keycode 237 = period greater
! Remove dangerous Caps_Lock
remove Lock = Caps_Lock
================ end of .keymap ================

Happy hacking!

	Johan

-- 
Johan Vromans				       jv@mh.nl via internet backbones
Multihouse Automatisering bv		       uucp: ..!{uunet,hp4nl}!mh.nl!jv
Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62911/62500
------------------------ "Arms are made for hugging" -------------------------