Jump to content
Sign in to follow this  
therks

Prevent key notification / Cancel key down message

Recommended Posts

therks

*Edit: The topic description is now the title of a topic on another forum I found while Googling for info for this, unfortunately he didn't get any responses.

Okay, so here goes, I'm wondering if there's some way (via DllCall maybe?) that I can cancel the notification from being received from a key... confused? I'll use an example of what I want to do.

I'm trying to setup something like a HotKey, except I guess you'd call it more of a HotClick. I want to rig up an action to Win+LeftClick, and using IsPressed I have the basics figured out.

The (probably obvious) problems I have are:

1) The left click still hits whatever window I'm clicking on, and does the default left click action.

2) When I release the Windows key, the Start Menu pops up.

Some simple code:

#include <Misc.au3>

HotKeySet('{esc}', '_exit')

While 1
    If _IsPressed('01') and _IsPressed('5B') Then
        ; CancelKey('01') ??
        ; CancelKey(5B') ??
        MsgBox(64, 'Win+Click', 'Yay, successful.')
    EndIf
WEnd

Func _exit()
    exit
EndFunc

Now if I'm in, for example, a paint window, and I hold Windows key and left click, the msgbox does appear, but I've already drawn on the window, and like I said above, when I release the Windows key, the Start Menu appears. I'm wondering if there's anything like the comments in the script above that I can utilize. I just figure that when you use HotKeySet whatever keys you get don't get through anymore, they're totally captured, like if you HotKeySet('a', 'bleh') then you're not typing the A key anymore. So I'm guessing (hoping) that there's some function in use there that keeps the key from getting past that capture point.

Thanks for reading.

*Edit: Forgot a whole sentence...

Edited by Saunders

Share this post


Link to post
Share on other sites
therks

Guess nobody has any ideas, eh? Ah well, only gonna bump this once.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×