I want to hear the beep without seeing 'B' as output on Notepad. How can I implement this?
if (GetAsyncKeyState('B') & 0x8000)
{
Beep( 500, 500 );
}
I want to hear the beep without seeing 'B' as output on Notepad. How can I implement this?
if (GetAsyncKeyState('B') & 0x8000)
{
Beep( 500, 500 );
}
Use a keyboard hook via SetWindowsHookEx()
. When your hook callback detects the desired key stroke, you can block the key stroke so it is not passed on to subsequent hooks or the target application.