Computer Science Canada multibutton tip |
Author: | ttm [ Sat Jan 07, 2012 12:34 pm ] | ||
Post subject: | multibutton tip | ||
First, multibutton is broken. Proof:
It always only shows either 1, 10, or 100. According to the documentation, it should show values such as 101 when you left and right click simultaneously. The tutorial part: I realized that you could take the button value mod 8, and bit 0 of the result would be if you left clicked, bit 1 would be if you middle clicked, and bit 2 would be if you right clicked. But since it's broken, this tip is temporarily useless until it gets fixed. |
Author: | Dreadnought [ Sat Jan 07, 2012 5:23 pm ] | ||
Post subject: | Re: multibutton tip | ||
When life gives you lemons, grow your own oranges to make orange juice!
Hope this helps you! |
Author: | ttm [ Sun Jan 08, 2012 1:08 pm ] |
Post subject: | Re: multibutton tip |
(y) |
Author: | ttm [ Sun Jan 08, 2012 1:29 pm ] |
Post subject: | Re: multibutton tip |
It doesn't work when the mouse is outside of the window though. |
Author: | Dreadnought [ Sun Jan 08, 2012 5:23 pm ] | ||
Post subject: | Re: multibutton tip | ||
ttm wrote: It doesn't work when the mouse is outside of the window though. That's true, when the turing window is not active it does not receive mouse events. Most of the time, this shouldn't be too much of a problem since you don't click outside the Turing window to do stuff in the Turing window. Here's an update to my previous code using Mouse.Where to the best of its ability (like you showed it's not functioning properly):
Overall, it seems we can't get full information about mouse buttons when the mouse is not in an active Turing window. On the other hand, this should rarely be troublesome as you don't tend to care about mouse input when the mouse is not in the window. |