[Lazarus] TShiftState "lock" states in mousewheel events

Flávio Etrusco flavio.etrusco at gmail.com
Tue Oct 4 18:57:04 CEST 2011


>> AFAICS the key state will report whether the "lock key"
>> is pressed down, not it's toggled state.
>
> No, at least in my tests on Win32 they did indicate toggled state.
> Otherwise | would not have a problem in the first place.
>
> --
> Alexander S. Klenin
>
> --

My bad, indeed the code checks for toggled state.

-  if (GetKeyState(VK_MENU) and $8000) <> 0 then
-    Result := Result + [ssAlt];
-  if (GetKeyState(VK_NUMLOCK) and 1) <> 0 then
-    Result := Result + [ssNum];
-  //TODO: ssSuper
-  if (GetKeyState(VK_SCROLL) and 1) <> 0 then
-    Result := Result + [ssScroll];


-Flávio




More information about the Lazarus mailing list