community.borland.com

Article #15587: Making your own hotkeys.

 Technical Information Database

TI587D.txt   Making your own hotkeys.
Category   :VCL
Platform    :All
Product    :Delphi  All

Description:
Q:  How can I trap for my own hotkeys?

A:  First: set the form's KeyPreview := true;

Then, you do something like this:

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');
end;



Reference:


7/16/98 4:33:48 PM
 

Last Modified: 01-SEP-99