{
OnKeyPress example
This event handler displays a message dialog box specifying which key was pressed:
} 
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
  MessageDlg(Key + ' has been pressed', mtInformation, [mbOK], 0)
end; 
