I am trying to remake (OllyDbg) an application (game) that disables (captures / intercepts / blocks) all global hot keys while its window (D3D) is active (except for Ctrl-Alt-Del).
My question is, how could such an application capture / disable global hot keys (including blinking, CTRL + Esc and global hot keys installed in other applications) while its window is active?
DirectInput seems to be used (if that matters). I see that it does not set low level hooks ( SetWindowsHookEx ). In what other cases can this be done?
Observations made:
- When the application is paused (although its window is still in focus), the hotkeys are still disabled when the window is in focus. Switching the window to something else allows them. Returning to the paused application window disables the hotkeys again.
- If you do the same thing, but pause the application after the window has lost focus, and then switch back to the paused window, the hot keys fully work.
- Edit:. The application blocks the global hotkeys set using
RegisterHotKey , but does not disable the hotkeys made using the hook ( SetWindowsHookEx ).
The experiment seems to indicate that some settings related to the window work even when the application is paused. Could this be some kind of DirectInput setting? (Altho the only DINPUT API function call that I see is DINPUT8.DirectInput8Create .)
I do this in the hope of changing this behavior so that keyboard shortcuts from other applications work as usual, while the games window is focused. Any ideas and tips appreciated.
source share