procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); case Key of VK_F1 begin Button1.Click; end;