Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean);
var
S: TKeyboardState;
begin
case Msg.message of
WM_KEYDOWN:
begin
GetKeyboardState(S);
if (S[VK_CONTROL] and $80 <> 0) and (S[9] and $80 <> 0) then
Handled := true;
end;
end;
end;
//define ctrl as global var somewhere and set it to false
procedure TMainForm.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean);
begin
case Msg.message of
WM_KEYDOWN:
begin
if Ctrl then
Handled:=Msg.Wparam = VK_TAB
else
Ctrl:=Msg.Wparam = VK_CONTROL;
end;
end;
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
Application.OnMessage:=ApplicationEvents1Message;
end;
procedure TMainForm.ApplicationMessage(var Msg: tagMSG; var Handled: Boolean);
begin
if Msg.message = WM_KEYDOWN then
begin
if Ctrl then
Handled:=Msg.Wparam = VK_TAB
else
Ctrl:=Msg.Wparam = VK_CONTROL;
end;
end;