Caputuring all keystrokes
-
I am trying to have my app monitor the every key stroke. If F6 is press at any time, it should launch? Can anyone guide where I can find out how to do this? Thank you, SAK
If you want your app to be activated when a key is pressed, take a look at the RegisterHotkey[^] function, and its message friend, WM_HOTKEY[^]. You can use the RegisterHotkey function to register a hotkey that, when pressed, sends your window a WM_HOTKEY message. You can then activate your app when you get it. BTW, F6 is not necessarily a good choice of hotkey, because another app is likely to already be using that key combination as a shortcut. Maybe you should use Ctrl+Shift+F6? ;)
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi -
If you want your app to be activated when a key is pressed, take a look at the RegisterHotkey[^] function, and its message friend, WM_HOTKEY[^]. You can use the RegisterHotkey function to register a hotkey that, when pressed, sends your window a WM_HOTKEY message. You can then activate your app when you get it. BTW, F6 is not necessarily a good choice of hotkey, because another app is likely to already be using that key combination as a shortcut. Maybe you should use Ctrl+Shift+F6? ;)
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi