Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!sirius!jeremy From: jeremy@cs.adelaide.edu.au (Jeremy Webber) Newsgroups: comp.sys.sgi Subject: Re: Turning the Alt key into a Meta key Message-ID: Date: 1 May 91 23:31:13 GMT References: <48184@ut-emx.uucp> <3430@charon.cwi.nl> Sender: news@ucs.adelaide.edu.au Organization: Digital Arts Film and Television Lines: 76 Nntp-Posting-Host: chook.ua.oz.au In-reply-to: guido@cwi.nl's message of 1 May 91 10:30:45 GMT This works for me under Irix 3.2, for NeWS applications such as wsh. Create a directory in your home directory called NeWS. Copy /usr/NeWS/lib/NeWS/UI.ps into it. Then apply the following patch. Hope this helps, -jeremy ------- cut here and remove the .sig from the end --- *** /usr/NeWS/lib/NeWS/UI.ps Tue Nov 28 10:23:00 1989 --- UI.ps Thu Feb 22 09:34:42 1990 *************** *** 1,3 **** --- 1,10 ---- + + % Modified at Digital Arts to make the right Alt key act like + % a META key. + % NB: with this patch ordinary access to the right Alt key is disabled!! + % + % The new code is added in two places, deliniated by comments. Look for the + % keyword "meta". % % UI.ps: low level of mouse & keyboard user interface % *************** *** 467,475 **** --- 474,512 ---- } ifelse } def + % new code for meta key + /MetaDown false def % true when either alt key is down + + { + createevent dup begin % gobble alt key + /Name [28560] def % right Alt key + /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 + %end new code + + /deliver_keyboard_to_focus { % event => - dup dup begin % ev ev sgi_translatekey % ev (string) + % new code for meta key + 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 + % end new code /ClientData exch def % ev end InteractionLock monitorlocked MenuBusy 0 ne or { -- -- -- Jeremy Webber ACSnet: jeremy@chook.ua.oz Digital Arts Film and Television, Internet: jeremy@cs.adelaide.edu.au 3 Milner St, Hindmarsh, SA 5007, Voicenet: +61 8 346 4534 Australia Papernet: +61 8 346 4537 (FAX)