Jump to content
Sign in to follow this  
qwert

How to dismiss received APPS hotkey?

Recommended Posts

qwert

I have a good use in mind for the APPSKEY as a hotkey ... a key that I never use. My prototype script is able to receive the key just fine (... using _HotKeyAssign($CVK_APPS) ). The problem is that after I've processed the key press, the same press is handed to Windows, which calls up the Undo/Cut/Copy/Paste menu.

How can I dismiss the key press so that nothing further happens? After a day's research, I'm thinking there's no simple solution ... but how about a complicated one? Maybe using DllCall("user32.dll" ... etc.

Anyone have an idea? I'm willing to work at it ... if I know of a viable direction.

Thanks in advance.

Share this post


Link to post
Share on other sites
qwert

I thought I might try asking this in a more detailed way. Here goes:

I've been researching _WinAPI_SetWindowHookEx ... and think it might represent a way to intercept the APPSKEY before it's processed as a right-click menu request by any application. So my rough idea is to use the hook operation to "get the key" ... and after my script finishes its response to the key, just don't pass it along. I found this reference on MSDN:

Calling the CallNextHookEx function to chain to the next hook procedure is optional, but it is highly recommended; otherwise, other applications that have installed hooks will not receive hook notifications .... You should call CallNextHookEx unless you absolutely need to prevent the notification from being seen by other applications.

Sounds promising ... but am I on the right path? I've barely done anyhing beyond Send() with my scripts, but the idea of a User-defined Keyboard Key opens some powerful possibilites.

Thanks for any advice.

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  

×