How to easily query mouse button status?

3 posts / 0 new
Last post
hypex
hypex's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2011-09-09 16:20
How to easily query mouse button status?

Hi guys.

So I'm wondering if there is an easy way to query mouse button status?

That is without having a window. Such as for a windowless commodity. I don't see anything in commodities.library that would help.

I know the input.device can be used with PeekQualifier() but it's a bit of work setting up a device and then getting a library interface just to use one function.

TSK
TSK's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2011-06-28 02:06
Re: How to easily query mouse button status?

I've used input.device in my commodity. I don't know if there's any other way.

hypex
hypex's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2011-09-09 16:20
Re: How to easily query mouse button status?

Was that to instantly read input? Sounds funny using input.device in a commodity. Since a commodity is designed to be at a higher level with the Cx functions doing the low level stuff. :-)

I didn't point it out. But I wanted to read input in my program startup. Since it's a commodity it does actually add a CxCustom routine to grab input so can read input but a mouse event needs to occur before that happens.

In any case I decided not to read input as it's not worth the hassle. It's easier just to default to no buttons pressed until that changes and my Cx handler stores it. Plus it's strange that my commodity would use input.device directly since it's already using commodities.library to do it all in standard fashion. :-D

Log in or register to post comments