Sign in to follow this  
Followers 0
unterhunde

Catching Keypresses

3 posts in this topic

Is it possible to capture keypresses prior to letting windows recieve them? (Like writing a LL API to hook keyboard in VB).

I wouldnt mind just being able to catch keypresses sent toward my GUI and then be able to relay them to any windows handle/controlID.

Are either of these possible?

Share this post


Link to post
Share on other sites



Is it possible to capture keypresses prior to letting windows recieve them? (Like writing a LL API to hook keyboard in VB).

I wouldnt mind just being able to catch keypresses sent toward my GUI and then be able to relay them to any windows handle/controlID.

Are either of these possible?

Look at _IsPressed or HotKeySet. Anything going beyond those sounds too much like a keylogger, and you'll have a very hard time getting help for that - and rightly so, too. You should expect an earful anyways.

Have you considered a different approach to your ultimate goal? For the purposes you describe, you might rather consider ControlFocus or WinActivate. Perhaps you could use the hotkeys to set the target window or control, that kind of thing. A sufficiently customizable app could take that notion a long way.

If you're intent on using a keyboard hook, AutoIt is definitely not the tool of choice.

Share this post


Link to post
Share on other sites

Look at _IsPressed or HotKeySet. Anything going beyond those sounds too much like a keylogger, and you'll have a very hard time getting help for that - and rightly so, too. You should expect an earful anyways.

Have you considered a different approach to your ultimate goal? For the purposes you describe, you might rather consider ControlFocus or WinActivate. Perhaps you could use the hotkeys to set the target window or control, that kind of thing. A sufficiently customizable app could take that notion a long way.

If you're intent on using a keyboard hook, AutoIt is definitely not the tool of choice.

Its ok thank you. I am making a program to run multiple gaming windows. I want the console to be able to catch keys and then duplicate and transmit them to all windows under its command.

I am also doing this project in VB. The AutoIT is just to see hwo far I can push the AutoIT script language. (and to have an easy to edit script for my less computer literate friends)

Thanks for your suggestions.

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  
Followers 0