Path: utzoo!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!caen!news.cs.indiana.edu!msi.umn.edu!noc.MR.NET!gacvx2.gac.edu!gacvx2.gac.edu!scott From: scott@texnext.gac.edu (Scott Hess) Newsgroups: comp.sys.next Subject: Re: Questions Message-ID: Date: 12 Mar 91 03:16:55 GMT References: <1991Mar11.115135.5482@neon.Stanford.EDU> Organization: Gustavus Adolphus College Lines: 33 Nntp-Posting-Host: texnext.gac.edu In-reply-to: zimmer@calvin.stanford.edu's message of 11 Mar 91 11:51:35 GMTLines: 33 In article <1991Mar11.115135.5482@neon.Stanford.EDU> zimmer@calvin.stanford.edu (Andrew Zimmerman) writes: 2. I am able to get a mouseDown event. Is it possible to distinguish between the left button, the right button, and a chord of both buttons? Also, can I get an event for both the button press and the button release? In Views (well, any Responder), you can override - rightMouseDown: to get the right mouse down event. You can also override mouseUp: and rightMouseUp:. You _might_ have to work with the window's event mask to get this stuff right (the event mask determines what events can get through). To detect both down, you'll probably have to use PSbuttondown() and PSrightbuttondown() (from /usr/include/dpsclient/wraps.h) to detect when the "other" button goes down. Might want to include a slight delay to give the user time for this. [Note: As you might guess, this all means that there's no straightforward way to see if both buttons are down. But it can be done, albeit in a fairly kludgy manner . . .] (Of course, if we were really loyal, we would go get NeXT tattoos like the Harley Davidson loyalist do :-) You don't? :-) Later, -- scott hess scott@gac.edu Independent NeXT Developer GAC Undergrad "Tried anarchy, once. Found it had too many constraints . . ." "I smoke the nose Lucifer . . . Banana, banana."