Hi,
I am using :
- Linux Mint Xfce 64 bit
- Lazarus 2.0.6 64 bit
- FPC 3.0.4
I am developing an application that should run in the background. I want to be able to start or stop a timer on that application when I push F5. When my application loses focus, The F5 key is not working anymore.
This is my code:
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
);
begin
begin
IF Key = VK_F5 then
begin
if Timer1.Enabled then
begin
Timer1.Enabled:=False;
ShowMessage('Timer is now Disable');
end
else
begin
Timer1.Enabled:=True;
ShowMessage('Timer is now Enable');
end
end;
end;
end;
Anyone know a way to intercept the F5 key when my application is minimized?