Zohar Posted October 6, 2009 Posted October 6, 2009 (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 February 29, 2012 by Zohar
Zedna Posted October 6, 2009 Posted October 6, 2009 Look at _IsPressed() Resources UDF ResourcesEx UDF AutoIt Forum Search
Zohar Posted October 6, 2009 Author Posted October 6, 2009 _IsPressed() doesn't block the key from getting to the active application. it just "spies" on it, and letting it thru..
Zedna Posted October 6, 2009 Posted October 6, 2009 (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 October 6, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Zohar Posted October 6, 2009 Author Posted October 6, 2009 (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 October 6, 2009 by Zohar
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now