Reputation: 321
I have a windows c++ console app and I want to redefine behaviour of program when I pressing 'pause' key durning runtime. How I can do this?
If there is no way to redefine behaviour key 'pause', how can I detect pressing any specific key asynchronously?
I know about WM_KEYPRESSED message, but as I understand it works only for window UI apps.
Maybe there some solutions in boost?
Upvotes: 0
Views: 81
Reputation: 613511
Use SetWindowsHookEx
to install a low-level keyboard hook, WH_KEYBOARD_LL
, that traps and discards the offending key press.
Upvotes: 1