I need a way to capture keys when app's out of focus.

In windows the GetAsyncKeyState() returns a boolean depending on whether the key value passed to it is pressed. However this is for the KEYS and not for CHARacters so when passed to a character varriable only some of the keys match there character values. Also any letters will always show as caps because the input is directly from the KEYS.

So my question is, is there a function in windows to return a CHARacter code rather than a KEY code, if you think about Windows already does this somehow so you're able to type, i just want to wif there's a way to access this area of windows, and more importantly... If it's available "out of focus" to the application.
The easiest way to receive characters is to process a WM_CHAR message passed to a window.

If you want to do it even when your program is in the background, one of possible solutions is to install a WH_GETMESSAGE hook using SetWindowsHookEx.
Topic archived. No new replies allowed.