procedure TForm1.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
begin
// appui sur une touche
//IsShift := GetKeyState(VK_SHIFT) < 0; // Touche Shift appuyée
case Msg.CharCode of
Ord('A'): begin ButtonClick(Buttona); Handled:= True; end;
Ord('B'): begin ButtonClick(Buttonb); Handled:= True; end;
Ord('C'): begin ButtonClick(Buttonc); Handled:= True; end;
Ord('D'): begin ButtonClick(Buttond); Handled:= True; end;
Ord('E'): begin ButtonClick(Buttone); Handled:= True; end;
Ord('F'): begin ButtonClick(Buttonf); Handled:= True; end;
Ord('G'): begin ButtonClick(Buttong); Handled:= True; end;
Ord('H'): begin ButtonClick(Buttonh); Handled:= True; end;
Ord('I'): begin ButtonClick(Buttoni); Handled:= True; end;
Ord('J'): begin ButtonClick(Buttonj); Handled:= True; end;
Ord('K'): begin ButtonClick(Buttonk); Handled:= True; end;
Ord('L'): begin ButtonClick(Buttonl); Handled:= True; end;
Ord('M'): begin ButtonClick(Buttonm); Handled:= True; end;
Ord('N'): begin ButtonClick(Buttonn); Handled:= True; end;
Ord('O'): begin ButtonClick(Buttono); Handled:= True; end;
Ord('P'): begin ButtonClick(Buttonp); Handled:= True; end;
Ord('Q'): begin ButtonClick(Buttonq); Handled:= True; end;
Ord('R'): begin ButtonClick(Buttonr); Handled:= True; end;
Ord('S'): begin ButtonClick(Buttons); Handled:= True; end;
Ord('T'): begin ButtonClick(Buttont); Handled:= True; end;
Ord('U'): begin ButtonClick(Buttonu); Handled:= True; end;
Ord('V'): begin ButtonClick(Buttonv); Handled:= True; end;
Ord('W'): begin ButtonClick(Buttonw); Handled:= True; end;
Ord('X'): begin ButtonClick(Buttonx); Handled:= True; end;
Ord('Y'): begin ButtonClick(Buttony); Handled:= True; end;
Ord('Z'): begin ButtonClick(Buttonz); Handled:= True; end;
vk_space: begin btnSpaceClick(btnSpace); Handled:= true; end;
vk_shift: begin btnshiftClick(btnshiftd); Handled:= true; end;
vk_back: begin pnl_returnClick(pnl_return); handled:= true; end;
else
showmessage('touche non répertoriée'); handled:= true;
end;
end;
Partager