How can i know the user input trough the keyboard when my program isnīt in the focus?
e.g.: Iīm at my desktop and when I press alt+x my program comes to the screen, something like that, or just handle the input trough WM_CHAR.
Printable View
How can i know the user input trough the keyboard when my program isnīt in the focus?
e.g.: Iīm at my desktop and when I press alt+x my program comes to the screen, something like that, or just handle the input trough WM_CHAR.
Sounds like you want a hot key. Look up the RegisterHotKey function.
I was just using RegisterHotKey for my app, but had no idea it registered the hotkey system-wide! How do you register a hotkey exclusively for use only when your window has keyboard focus?
(I was thinking of handling WM_CHAR, but I don't know if/how a WM_CHAR message will notify you of any modifier keys being pressed like the WM_HOTKEY message does...)