procedure TForm1.acAppEvents1AppKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState; KeyName: string; RepeatedKeypress: Boolean);
begin
  if not RepeatedKeypress then
   case Key of
     VK_ESCAPE: Application.Minimize; // Esc key
     VK_F1: ShowMessage('F1 pressed'
);
    end;  
end;