iDevGames Forums
Second mouse button input - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Second mouse button input (/thread-7200.html)

Second mouse button input - David - Mar 25, 2003 05:15 PM

Is this possible in Carbon? Do you know how to do this?

Second mouse button input - OneSadCookie - Mar 25, 2003 06:51 PM

You can do it with Carbon Events.

Second mouse button input - rvangaal - Mar 26, 2003 08:50 AM

Pseudo-code (clips):

static int ParseCarbonEvent(EventRef e,QEvent *qe)
UInt32 _class,kind;
Point point;
int n;

// Basic info on event

// Mouse
case kEventClassMouse:
EventMouseButton b;

printf(" button %d\n",b);

Second mouse button input - David - Mar 27, 2003 08:58 PM

Neat, thanks Smile

It would be a lot easier if I could do it with EventRecords though, is that possible? Or do I have to redo everything to use carbon events.

Second mouse button input - monteboyd - Mar 27, 2003 09:01 PM

Probably best to get into Carbon Events anyway, I'm starting to like 'em quite a lot.

Second mouse button input - rvangaal - Mar 28, 2003 07:24 AM

Are the EventRecords from the Classis system?
I know my first events on the Mac did only the 1st mouse button, and Carbon events were indeed needed.
Gives you a mouse wheel as well...