Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!pequod.cso.uiuc.edu!dorner From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Newsgroups: comp.sys.mac.programmer Subject: Re: WaitNextEvent questions Message-ID: <1991May17.125352.27138@ux1.cso.uiuc.edu> Date: 17 May 91 12:53:52 GMT References: <1991May17.044439.25162@schaefer.math.wisc.edu> Sender: usenet@ux1.cso.uiuc.edu (News) Organization: University of Illinois at U-C Lines: 20 In article <1991May17.044439.25162@schaefer.math.wisc.edu> dickie@schaefer.math.wisc.edu (Garth Dickie) writes: >Most of the time, the modifiers field seems to be set correctly, but this may >be an artifact of the previous event. The way I get modifiers now is to call >GetKeys and look at the right bits. I don't like this much :-) I don't blame you. This is what I use: /************************************************************************ * CurrentModifiers - return the current state of the modifers ************************************************************************/ short CurrentModifiers(void) { EventRecord theEvent; (void) GetNextEvent(nil,&theEvent); return(theEvent.modifiers); } -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner