Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!ginosko!uunet!mcsun!ukc!edcastle!lfcs!nick From: nick@lfcs.ed.ac.uk (Nick Rothwell) Newsgroups: comp.sys.mac.programmer Subject: How to detect Option/Close under TransSkel? Message-ID: <253@castle.ed.ac.uk> Date: 28 Aug 89 11:45:40 GMT Sender: root@castle.ed.ac.uk Reply-To: nick@lfcs.ed.ac.uk (Nick Rothwell) Organization: LFCS Enya Admiration Society Lines: 23 I'm writing an application which needs to detect option/click and command/click on the close box of windows. Unfortunately, TransSkel (which I'm using) doesn't deliver the event modifiers to me, but only the close event. I'm currently using a hack: after getting the close event, look at the key-map to see if the option/command keys are down. Disadvantages: o Hard-wired key numbers which may not be universal between machines; o Disallows command/key short-cut for close (think about it...); o It's a HACK. Advantage: o I don't have to make yet more alterations to my (already much customised) copy of TransSkel. I suspect that altering TransSkel yet again is the only true option. Just out of curiosity, how does MultiFinder detect Option when opening DAs in the application partition? Might it be this self same hack? Nick. -- Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh. nick@lfcs.ed.ac.uk !mcvax!ukc!lfcs!nick ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ Fais que ton reve soit plus long que la nuit.