Path: utzoo!attcan!uunet!lll-winken!ames!pasteur!ucbvax!ucsfcgl!cgl.ucsf.edu!pett From: pett@cgl.ucsf.edu (Eric Pettersen%CGL) Newsgroups: comp.sys.sgi Subject: Re: Iris key remapping Summary: It's possible Message-ID: <11313@cgl.ucsf.EDU> Date: 12 Jan 89 02:33:12 GMT References: <8901100147.aa05163@SEM.BRL.MIL> <24593@sgi.SGI.COM> Sender: daemon@cgl.ucsf.edu Reply-To: pett@cgl.ucsf.edu (Eric Pettersen%CGL) Organization: UCSF Computer Graphics Lab Lines: 46 Here is some code you can put in your user.ps to swap the CapsLock and Control key under 3.0 and 3.1c. I suggest that you actually imbed it your RestartActions array, just to be safe. This code uses undocumented operators and constants, so who knows how it will work in future releases! It is possible to change any key, but the code below is pretty much hard-coded to do what it does, and is not a flexible facility for arbitrary key remapping... Eric Pettersen pett@cgl.ucsf.edu ...!ucbvax!ucsfcgl!pett ----- { /CapsOn false def /ControlOn false def /eventhandler { dup /Action get exch /Name get { 28420 { % Caps Lock /DownTransition eq { /ControlOn true def } { /ControlOn false def } ifelse } 28419 { % Control /DownTransition eq { /CapsOn CapsOn not def } if } } case 2 CapsOn { /LampsOn } { /LampsOff } ifelse keyboardcontrol CapsOn { 1 } { -1 } ifelse 4 adjustkeyboardshiftstate ControlOn { 1 } { -1 } ifelse 1 adjustkeyboardshiftstate } def createevent dup begin /Name [ 28420 28419 ] def end expressinterest { awaitevent eventhandler } loop } fork pop -----