Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!spool.mu.edu!cs.umn.edu!uc!uh.msc.umn.edu!ken From: ken@uh.msc.umn.edu (Ken Chin-Purcell) Newsgroups: comp.sys.sgi Subject: Re: source for alterative keyboards for sgi? Keywords: keyboard sgi caps-lock control escape Message-ID: <3986@uc.msc.umn.edu> Date: 27 Apr 91 17:48:47 GMT Article-I.D.: uc.3986 References: <1991Apr27.171639.742@s1.msi.umn.edu> Sender: news@uc.msc.umn.edu Reply-To: ken@msc.edu Organization: Minnesota Supercomputer Center Lines: 45 Joe Habermann writes: > Does anyone sell a keyboard for SGI systems whose mapping > is a little more C- and friendly? Oh, and that > stupid caps-lock can be missing completely. Hi Joe... This has come up before here, so I'll contribute the following magic incantation to switch key meanings via NeWS. I got this from someone else, and I haven't bothered to figure how it works or what other key codes are.... Maybe someone could post how to find out what a key's keyval is? From my user.ps, to switch the left hand Caps Lock and Ctrl keys: /replacekeys { % origkeyvals_array changedkeyvals_array -> - { /changedvals exch def /origvals exch def /keysdict origvals length dict def keysdict begin 0 1 origvals length 1 sub { dup origvals exch get changedvals 3 2 roll get def } for end createevent dup begin /Name origvals def /Priority 2 def /Exclusivity true def end expressinterest { awaitevent dup dup begin /Name get keysdict exch get /Name exch def end redistributeevent } loop } fork pop pop pop } def % lcap ctrl ctrl lcap [ 28420 28419 ] [ 28419 28420 ] replacekeys -- Ken Chin-Purcell, Graphics, AHPCRC, Minnesota Supercomputer Ctr. -- also known as ken@msc.edu and 612-626-8090