Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!brazos.rice.edu!pete From: pete@titan.rice.edu (Pete Keleher) Newsgroups: comp.sys.mac.programmer Subject: Option Key and Amanda's Solutions Message-ID: Date: 30 Nov 89 05:38:20 GMT Sender: root@rice.edu Distribution: comp Organization: Whatsamatta U Lines: 48 The solutions presented by were exactly what I was asking for. Unfortunately, I don't have IM V (got I-IV, but...). I asked a friend for the parameters and wrote the following code in LSC v3. I got an infinite cycle of Odd Address errors as soon as the NSetTrapAddress was invoked. A breakpoint placed at my trap routine seems not to have been encounted. I would have sent mail to Amanda directly asking for further advice, but rice.edu doesn't seem to be able to find your machine. Opinions, chuckles, guffaws, kudos for the Central-Division-leading Cleveland Browns welcome: .. #include .. long keyTransAddr; .. pascal long keyTransHeadPatch(transData, theKeyCode, myState) char *transData; int theKeyCode; long *myState; { register int option_mask = theKeyCode & optionKey; register int control_mask = theKeyCode & controlKey; theKeyCode &= ~(optionKey | controlKey); theKeyCode |= (option_mask << 1) | (control_mask >> 1); return(CallPascalL(transData, theKeyCode, myState, keyTransAddr)); } .. Initialize all routines .. keyTransAddr = NGetTrapAddress((int)0xac93,ToolTrap); BOOM-> NSetTrapAddress(keyTransHeadPatch,(int)0xac93,ToolTrap); if (NGetTrapAddress((int)0xac93,ToolTrap) != (long)keyTransHeadPatch) { SysBeep(1); Debugger(); } -- =========================================================================== Pete Keleher pete@titan.rice.edu Rice University knows nuttin about what I say, or what I do ... ===========================================================================