Guest User

Untitled

a guest
Jan 19th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. function KeyBoardProc(ACode: Integer; AWParam :WParam; AMsg: PMsg): LRESULT; stdcall;
  2. begin
  3. ...
  4. form1.caption:=Inttostr(AMsg.message); // Структура PMsg
  5. ...
  6. result:=CallNextHookEx(hh,ACode,AWParam,LongInt(Amsg));
  7. end;
  8.  
  9. function KeyBoardProc(ACode: Integer; AWParam :WParam; AMsg: PMsg): LRESULT; stdcall;
  10. var state:TKeyBoardState;
  11. begin
  12. GetKeyboardState(State);
  13. for i:=1 to 255 do
  14. if((State[i] and 128) <> 0) then form1.caption:=Inttostr(i); // получаем нажатую
  15. клавишу
  16. result:=CallNextHookEx(hh,ACode,AWParam,LongInt(Amsg));
  17. end;
  18.  
  19. курсор ↑ 38 0×26 VK_UP
  20.  
  21. 8 104 0×68 VK_NUMPAD8
Add Comment
Please, Sign In to add comment