[Lazarus] TShiftState "lock" states in mousewheel events

Hans-Peter Diettrich DrDiettrich1 at aol.com
Tue Oct 4 01:25:49 CEST 2011



Alexander Klenin schrieb:
> 2011/10/4 Flávio Etrusco <flavio.etrusco at gmail.com>:
>>>>> Delphi does not have these elements, and, since they are usually not working anyway,
>> This is easily fixable ;-) But until now I didn't realize this breaks
>> code written for Delphi that checked for empty set or superset. I take
>> back my argument for handling them in other messages then. The LCL
>> implements GetKeyState anyway (although I'd prefer it was "pascalized"
>> to avoid bitmasks...)
> 
> Of course. There should be a way to check key locks state,
> TShiftState is just not a good place for this.

+1

The keyboard lock states (ssNumLock etc.) modify *keyboard* input 
(WM_KEYUP/DOWN), but are not normally usable with *mouse* input 
(WM_LBUTTONUP/DOWN). That's why mouse input also does not normally 
distinguish between e.g. left and right CTRL or SHIFT key, because left 
handed people will use the modifier keys at the right side, when 
operating the mouse with the left hand.

I see no reason for adding them to TShiftState, they better belong to 
GetAsyncKeyState etc.

DoDi





More information about the Lazarus mailing list