Dear All
I am grateful to you if you told me how to insert the mouse Information to controll (right,lift and middle buttons) using the first byte described in the attached article and flowcode example
http://www.matrixmultimedia.com/resourc ... ontrol.pdf
thanks
tharowat
mouse button information
Moderator: Benj
- Steve
- Matrix Staff
- Posts: 3431
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: mouse button information
I believe the button data is contained in the first byte of the data sent. You may need to experiment to see which bits of this byte represent which button.
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: mouse button information
Hi. Typically on Windows and other similar systems, left is bit 0, right is bit 1 and middle is bit 2. I do not know about the scroll wheel (if present) though.
Jonny
Jonny
- misoct
- Posts: 64
- Joined: Sat Sep 04, 2010 11:03 pm
- Location: Egypt
- Has thanked: 8 times
- Been thanked: 17 times
Re: mouse button information
Hi Steve
thank you for quick reply
indeed I did the trials to dedect the bit by inserting input macro components in the flochart and push button in hardware also ,but there is no postive results
I want to know how to distigushe between button info.inside the flowcode program
thanks
tharowat
thank you for quick reply
indeed I did the trials to dedect the bit by inserting input macro components in the flochart and push button in hardware also ,but there is no postive results
I want to know how to distigushe between button info.inside the flowcode program
thanks
tharowat
- Steve
- Matrix Staff
- Posts: 3431
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: mouse button information
I've just played around with the USB_Sketch program and I can confirm that the bits of the first data byte are as follows:
bit 0 = left button
bit 1 = right button
bit 2 - middle button
bit 0 = left button
bit 1 = right button
bit 2 - middle button
- misoct
- Posts: 64
- Joined: Sat Sep 04, 2010 11:03 pm
- Location: Egypt
- Has thanked: 8 times
- Been thanked: 17 times
Re: mouse button information
Hi Steve
Here I worked on to add the information mouse buttons inside flowcode USB_Sketch_mod.fcf I hope to be right as i understand your explain
thanks
tharowat
Here I worked on to add the information mouse buttons inside flowcode USB_Sketch_mod.fcf I hope to be right as i understand your explain
thanks
tharowat
- Attachments
-
- USB_Sketch_mod.fcf
- (13.5 KiB) Downloaded 306 times
- Steve
- Matrix Staff
- Posts: 3431
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: mouse button information
You would need to do something like the following, assuming "left", "right" and "middle" are variables which are true (i.e. non-zero) if the user is pressing them:
Code: Select all
output[0] = 0
if (left) then output[0] = output[0] | 1
if (right) then output[0] = output[0] | 2
if (middle) then output[0] = output[0] | 4
output[1] = velH
output[2] = velV