Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!funic!santra!hila.hut.fi!jmunkki From: jmunkki@hila.hut.fi (Juri Munkki) Newsgroups: comp.sys.mac.programmer Subject: Re: posting events with modifiers Message-ID: <1990Aug25.094039.17415@santra.uucp> Date: 25 Aug 90 09:40:39 GMT References: <1990Aug24.232505.4970@aucs.uucp> Sender: news@santra.uucp (Cnews - USENET news system) Reply-To: jmunkki@hila.hut.fi (Juri Munkki) Organization: Helsinki University of Technology, FINLAND Lines: 23 In article <1990Aug24.232505.4970@aucs.uucp> ifocs9d@aucs.uucp (Rick Giles) writes: >I want to post a keyDown event with a given modifiers value. Can this >be done after PostEvent or PPostEvent? Thanks. It can be done with Enqueue. Here's one that does a cmd-shift-9: EvQEl thePress; thePress.qType=evType; thePress.evtQWhat=keyDown; thePress.evtQMessage='9'; thePress.evtQWhen=TickCount(); thePress.evtQModifiers=cmdKey+shiftKey; Enqueue(&thePress,GetEvQHdr()); I haven't tried PPostEvent, but it might also be able to do the trick. Why haven't you tried? Why do people insist on asking the net before trying to write maybe ten lines of code to test their ideas? ___________________________________________________________________________ / Juri Munkki / Helsinki University of Technology / Wind / HP S / / jmunkki@hut.fi / Computing Center Macintosh Support / Surf / 48 X / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~