You can register a global hotkey with the
RegisterHotKey
function,
but one problem many people have is that if the
user presses and holds the hotkey sequence,
the hotkey will be invoked as fast as auto-repeat
will let it.
For some types of hotkeys, this is not desirable.
How do you prevent this?
Starting in Windows 7,
you can pass the
MOD_
flag
to the
NOREPEAT
RegisterHotKey
function
to tell it not to generate
WM_
messages
if the hotkey activation sequences was triggered by autorepeat.
HOTKEY
The initial press of the hotkey will generate a
WM_
message,
but the auto-repeats will not.HOTKEY