How would I capture the user pressing Ctrl twice (Ctrl + Ctrl) globally. I want to be able to have my application window hidden and then make it visible when the user invokes it with the CtrlCtrl key presses similar to Google Quick Search Box. The user may have focus on a different window. I’ve looked at RegisterHotKey, but that seems to be for MODIFIERS + character key unless I’m mistaken.
How would I capture the user pressing Ctrl twice ( Ctrl + Ctrl )
Share
To create such a hotkey, do this:
And then handle the
WM_HOTKEYmessage:I guess you’ll figure out yourself that you need to store whether the CTRL key was pressed before. For example, if it was pressed once in the last 500 ms, and the user presses it again, you have a CTRL+CTRL press.