Jump to content

HotKeySet() not swallowing keystroke..


Recommended Posts

Despite using HotkeySet(), the window is still receiving the set key. Strangely, the key is not passed for every other application except the one I'm using it for (EarMaster Pro). Are some applications written in a way that nullifies the key swallow?

HotKeySet("{SPACE}","test")

HotKeySet("{ESC}","exitt")

while 1 ; main LOOP

sleep(11)

WEnd

Func test()

;do something

sleep(11)

EndFunc

Func exitt()

HotKeySet("{ESC}")

HotKeySet("{SPACE}")

Exit

EndFunc

Link to comment
Share on other sites

The problem is that the key is passed regardless of whether I've set the hotkey or not. I actually need to use the hotkey in the stubborn application, so I don't see how that switch would help.

In case my example wasn't clear:

the "{SPACE}" key is sent to the window, even though i've used hotkeyset("{SPACE}","test"). A bug?

cheers

Link to comment
Share on other sites

It seems like you can't do that using HotKeySet because if you use SetWindowsHookEx you can still be notified about WM_KEY* events. Try to test using the example of _WinAPI_SetWindowsHookEx and see if you can block the key from being sent to the rest of the chain. Try once when your script load first and once when after.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...