mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 05:49:30 +02:00
LCL: Improve GetKeyShiftState. Issue #33015, patch from AlexeyT.
git-svn-id: trunk@57119 -
This commit is contained in:
parent
061300d0d1
commit
4a92f982c4
@ -3205,15 +3205,13 @@ end;
|
||||
function GetKeyShiftState: TShiftState;
|
||||
begin
|
||||
Result := [];
|
||||
if (GetKeyState(VK_CONTROL) and $8000) <> 0 then
|
||||
if GetKeyState(VK_CONTROL) < 0 then
|
||||
Include(Result, ssCtrl);
|
||||
if (GetKeyState(VK_SHIFT) and $8000) <> 0 then
|
||||
if GetKeyState(VK_SHIFT) < 0 then
|
||||
Include(Result, ssShift);
|
||||
if (GetKeyState(VK_MENU) and $8000) <> 0 then
|
||||
if GetKeyState(VK_MENU) < 0 then
|
||||
Include(Result, ssAlt);
|
||||
if ((GetKeyState(VK_LWIN) and $8000) <> 0) or ((GetKeyState(VK_RWIN) and $8000) <> 0) then
|
||||
Include(Result, ssMeta);
|
||||
if (GetKeyState(VK_LWIN) < 0) or (GetKeyState(VK_RWIN) < 0) then
|
||||
if (GetKeyState(VK_LWIN) < 0) or (GetKeyState(VK_RWIN) < 0) then
|
||||
Include(Result, ssMeta);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user