Mega Code Archive

 
Categories / Delphi / Examples
 

How to trap own hotkeys in my application

Title: How to trap own hotkeys in my application procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (ssCtrl in Shift) and (chr(Key) in ['A', 'a']) then ShowMessage('Ctrl-A pressed!'); end; // To trap global hotkeys, have a look at tip 147