Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function KeyBoardProc(ACode: Integer; AWParam :WParam; AMsg: PMsg): LRESULT; stdcall;
- begin
- ...
- form1.caption:=Inttostr(AMsg.message); // Структура PMsg
- ...
- result:=CallNextHookEx(hh,ACode,AWParam,LongInt(Amsg));
- end;
- function KeyBoardProc(ACode: Integer; AWParam :WParam; AMsg: PMsg): LRESULT; stdcall;
- var state:TKeyBoardState;
- begin
- GetKeyboardState(State);
- for i:=1 to 255 do
- if((State[i] and 128) <> 0) then form1.caption:=Inttostr(i); // получаем нажатую
- клавишу
- result:=CallNextHookEx(hh,ACode,AWParam,LongInt(Amsg));
- end;
- курсор ↑ 38 0×26 VK_UP
- 8 104 0×68 VK_NUMPAD8
Add Comment
Please, Sign In to add comment