procedure TForm1.Memo1KeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin // Do something end; end;