[Lazarus] Key Handling problem in Windows
Aradeonas
aradeonas at operamail.com
Sat Sep 10 16:13:32 CEST 2016
Hi,
I have issue In windows if you hold the key down for more than 30-40
second it will not send new messages to the form and event will not run.
This is my code and it works in Ubuntu very good but not in windows L
> unit Unit1;
>
> {$mode objfpc}{$H+}
>
> interface
>
> uses
> Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
> ExtCtrls, LMessages;
>
> type
>
> { TForm1 }
>
> TForm1 = class(TForm)
> Panel1: TPanel;
> procedure FormKeyDown(Sender: TObject; var Key: word; Shift:
> TShiftState);
> procedure FormKeyUp(Sender: TObject; var Key: word; Shift:
> TShiftState);
> procedure FormShortCut(var Msg: TLMKey; var Handled: boolean);
> private
>
> public
> kd: integer;
> end;
>
> var
> Form1: TForm1;
>
> implementation
>
> {$R *.lfm}
>
> { TForm1 }
>
> procedure TForm1.FormKeyDown(Sender: TObject; var Key: word; Shift:
> TShiftState);
> begin
> WriteLn('FormKeyDown');
> WriteLn(GetTickCount64);
> end;
>
> procedure TForm1.FormKeyUp(Sender: TObject; var Key: word; Shift:
> TShiftState);
> begin
> WriteLn('FormKeyUp');
> Self.OnKeyDown := @FormKeyDown;
> Self.OnShortcut := @FormShortCut;
> end;
>
> procedure TForm1.FormShortCut(var Msg: TLMKey; var Handled: boolean);
> begin
> Handled := True;
> WriteLn('FormShortCut');
> end;
>
> end.
Regards,
Ara
--
http://www.fastmail.com - The professional email service
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160910/50a8ea54/attachment.html>
More information about the Lazarus
mailing list