Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^4: Unable to capture mouse events in Win32::Consoleby Marshall (Canon) |
on Apr 26, 2022 at 05:13 UTC ( [id://11143299]=note: print w/replies, xml ) | Need Help?? |
HI fireblood, I did spend some hours messing with this. On the surface, it appeared simple. But I found out that it was not. I do kick myself in the behind because at one point, I did get the "2" for mouse instead of "1" for keyboard and then without thinking, changed so many things at once that I am unable to re-create that result. The false "ahh-ha" syndrome! Hey, it happens! I am sure that there is a way to make Win32::Console do what you want, I just don't know how. I think this is a case where the documentation is just not very good. However, Perl Tk GUI's work great. There will be more support here for Tk GUI than for low level console stuff. I commented just this day about the Tk TableMatrix object in another thread. It could be that this is what is called an "X Y" problem. You are asking how to do X, but what you really need to know is how to do Y. There are various formulations of this situation. Since you are talking about mouse clicks, some more detail about how you envision your interface working would be helpful. there are all kinds of zoomy GUI things like drop down context sensitive things (i.e. right click ala Windows menus) that are possible. It could even perhaps be that your code becomes more simple and no polling loop is required. Out of curiosity, where does this 16 buttons come from? I've never seen a Windows mouse with more than 3, but perhaps that exists with some sort of special thing for a gaming control?
In Section
Seekers of Perl Wisdom
|
|