Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^4: Unable to capture mouse events in Win32::Console

by Marshall (Canon)
on Apr 26, 2022 at 05:13 UTC ( [id://11143299]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Unable to capture mouse events in Win32::Console
in thread Unable to capture mouse events in Win32::Console

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?

  • Comment on Re^4: Unable to capture mouse events in Win32::Console

Replies are listed 'Best First'.
Re^5: Unable to capture mouse events in Win32::Console
by Fletch (Bishop) on Apr 26, 2022 at 20:02 UTC

    The Razer Naga has "up to 19" buttons. I have an older model that "only" has the 1-12 side panel that I've been very happy with past couple of years. Great for arpgs / mmos / mobas where your main inputs are usually mapped to (e.g.) your 1-0 keys (but you can of course remap things arbitrarily in their software).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re^5: Unable to capture mouse events in Win32::Console
by fireblood (Scribe) on Apr 26, 2022 at 21:15 UTC
    Hi Marshall, my mouse is a Redragon M990 -- https://www.amazon.com/Redragon-M990-High-Precision-Programmable-Profiles/dp/B0171AOQG0. I got it so that I could program its buttons to echo out passwords when clicked. I do have a password manager (Dashlane) which meets most of my needs, but the extra edge that the mouse provides is being able to click on a button to type out my login password into a login screen which is encountered prior to being logged on to where Dashlane can then take over. Also, the passwords are stored in the mouse itself, so if I go to a place where I must use a different computer on which my Dashlane profile is not available, as long as I plug my mouse into that computer I can navigate to my usual online locations and then click on the mouse buttons to enter my passwords.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11143299]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-25 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found