Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-09

Key Handling problem in Windows

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Aradeonas

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

Show quoted text 58 lines
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>

Reply by email

Denis Kozlov
to Aradeonas
Aradeonas wrote
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

Which version of Lazarus and FPC are you using?

Denis

Reply by email

Denis Kozlov
to Denis Kozlov
Denis Kozlov wrote 6 lines
On 10/09/2016 15:13, Aradeonas wrote: > 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 Which version of Lazarus and FPC are you using?

Just ran a quick test with:
Lazarus 1.4.4 + FPC 2.6.4
Lazarus 1.6.1 + FPC 3.0.0

No issues, even if the key is down for 2 minutes.

Provide more details and a complete example project, otherwise it seems that you may have a problem elsewhere in your code.

Denis

Reply by email