source for alterative keyboards for sgi?

Ken Chin-Purcell ken at uh.msc.umn.edu
Sun Apr 28 03:48:47 AEST 1991


Joe Habermann writes:

> Does anyone sell a keyboard for SGI systems whose mapping
> is a little more C- and <esc> 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 at msc.edu and 612-626-8090



More information about the Comp.sys.sgi mailing list