I have the following problem: I have an application in which the Ctrl key activates an application event, and some users use RDP (remote access) to use that application, the problem is that the Ctrl key is triggered every time the user moves the RDP window or application switch and return to RDP.
For example:
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if (Key = VK_CONTROL) then
ShowMessage('Ctrl Pressed');
end;
I was able to see that the application detects the WM_KEYUP message and treats it, which ends up triggering the OnKeyUp event with parameter 17 (Ctrl), simulating that the Ctrl key was pressed.
I would like to know if anyone has any idea if this behavior is a bug in Delphi / RDP and if it has any possible solution.