Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!henry!hairston From: hairston@henry.ece.cmu.edu (David Hairston) Newsgroups: comp.sys.mac.programmer Subject: Re: keyUp events in THINK C Message-ID: Date: 8 Dec 90 18:48:18 GMT References: <109417.276027AF@cmhgate.FIDONET.ORG> Organization: Gaia II Lines: 25 In-reply-to: Jennings.Jennings@f31.n343.z1.FIDONET.ORG's message of 1 Dec 90 16:28:59 GMT [Jennings.Jennings@f31.n343.z1.FIDONET.ORG (Jennings Jennings) writes:] [] I have been playing with the TinyEdit sample that came with THINK C 4.0. [] I have tried and failed to find keyUp events in [] CSwitchboard::ProcessEvent(). I test for them right after WaitNextEvent [] which is called with everyEvent=0xFFFF. Can anyone suggest what might be [] wrong? this comes up from time to time (although it's documented clearly in Inside Mac, Vol. I, Ch. 8 - Toolbox Events and IM-II). the global System Event Mask is pre-defined as: everyEvent - keyUpMask in order to get KeyUp posted at all you must redefine the event mask. you can add/subtract KeyUp but it is bad karma to remove other events. SetEventMask(everyEvent); /* enables KeyUp */ or SysEvtMask = everyEvent; of course, you'll want to save the old mask and restore it when you don't need the change ... -dave- hairston@henry.ece.cmu.edu