milt@sgi.com (Milt Tinkoff) (08/18/90)
Can some out there tell me how to get the ALT key on an IRIS to act like a META key? No one seems to be able to give me a specific answer. -- Milt Tinkoff | "The lottery is a tax Silicon Graphics Inc. | on the stupid." milt@waynes-world.esd.sgi.com | -Ed Mao
spencer@eecs.umich.edu (Spencer W. Thomas) (08/20/90)
This change to the UI.ps file works under IRIX 3.2, anyway. Copy /usr/NeWS/lib/NeWS/UI.ps to ~/NeWS/UI.ps and then apply the patch below. A caveat: if you do this, you do not get a meta key under X. I think this is because this patch eats the Alt key event, so X never sees it. *** /usr/NeWS/lib/NeWS/UI.ps Tue Feb 28 13:42:02 1989 --- NeWS/UI.ps Mon Dec 18 12:17:57 1989 *************** *** 466,475 **** --- 466,499 ---- } ifelse } ifelse } def + /MetaDown false def % true when either alt key is down + { + createevent dup begin % gobble alt key + /Name [28560 28559] def + /Priority 4 def + /Exclusivity true def + end + expressinterest + { + awaitevent + dup /Action get /DownTransition eq + {/MetaDown true store} % downtrans -> set flag + {/MetaDown false store} % uptrans -> clear flag + ifelse + } loop + } fork + /deliver_keyboard_to_focus { % event => - dup dup begin % ev ev sgi_translatekey % ev (string) + dup dup type /stringtype eq % if there's a string + exch length 0 ne and % of nonzero length + MetaDown and % and meta is down + Action /DownTransition eq and % and ev is a keypress + {dup dup 0 get 128 or % then ior 128 into + 0 exch put % the 1st char in the string + } if /ClientData exch def % ev end InteractionLock monitorlocked MenuBusy 0 ne or { -- =Spencer W. Thomas EECS Dept, U of Michigan, Ann Arbor, MI 48109 spencer@eecs.umich.edu 313-936-2616 (8-6 E[SD]T M-F)