Hello!
Here is the function of handling the hook to the keyboard:
function KeyboardProc(nCode: Integer; wParam: wParam; lParam:lParam ): LParam; stdcall; begin messagebeep(1000,100); //for example end; And how can you handle the pressed key and make the speaker peep when you press a certain key? For example, on "1" or "2". Tried to do all this with the help
GetAsyncKeyState and
GetKeyState But the complete nonsense came out, because the first function determines the state not at the current moment, but for the entire time of operation (roughly speaking). So how can you get the key code in the hook? Thank!