[Lazarus] Getting keyboard input

Dave Coventry dgcoventry at gmail.com
Mon Aug 9 22:28:41 CEST 2010


Hi Guionardo. Thanks for the response.

2010/8/9 Guionardo Furlan <guionardo at gmail.com>:
> Have you used the Form's OnKeyPress/OnKeyDown/OnKeyUp events?

Yes.


procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
var ch: char;
begin
  ch:=char(key and $F);
  showmessage('Key='+ch); //<---showmessage not called
end;

As far as I can tell, the FormKeyUp is never called.

I have the TImage and the TMemo just about covering up most of the
Form1 area, but have called Form1.SetFocus.

Dave




More information about the Lazarus mailing list