Jump to content

Recommended Posts

Posted (edited)

Hello

I want to do this:

I have a Hotkey(F7), that when the user Presses it, he Follows it by any Key from the Keyboard.

I need to Capture the Key, and the Key can be either:

- a Single Key with no Control Keys(like "5", "A", "{Up}"), or

- a Single Key with Control Keys(Ctrl-A, Ctrl-Alt-A, etc.)

Note: The key cannot be just a Control key. It must be either a Key, or ControlKeys+Key.

How do I do I capture KeyPress following the HotKey, without using many HotKeySets?

Some API or something?

BTW:

When I capture the KeyPress, I need to capture it without having it going to the currently active application.

Thank you

Edited by Zohar
Posted

_IsPressed() doesn't block the key from getting to the active application.

it just "spies" on it, and letting it thru..

Posted (edited)

Then search forum for "hook". There are some scripts for mouse/keyboard hook (with helper HOOK.DLL).

As far as I know it was firstly introduced by Larry who later deleted all his posts so maybe it's copied somewhere in posts of other people.

EDIT: here is some link for "WH_KEYBOARD"

http://www.autoitscript.com/forum/index.php?showtopic=1888&view=findpost&p=450718

Edited by Zedna
Posted (edited)

Thank you Zedna..

BTW Anyone know how can I tell the hook not to pass the key to the active application?

(I will handle the keypress myself)

Edited by Zohar

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
  • Recently Browsing   0 members

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