Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-04 Thread Flávio Etrusco
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

[Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Alexander Klenin
The TShiftState enum in LCL includes ssNum, ssCaps and ssScroll elements, which should indicate the state of NumLock, CapsLock and ScrollLock correspondingly. However under Win32 KeyDown/Up and MoudeUp/Down/Move events do not recieve these elements, while MouseWheel events do. This required a

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Flávio Etrusco
On Mon, Oct 3, 2011 at 4:20 AM, Alexander Klenin kle...@gmail.com wrote: The TShiftState enum in LCL includes ssNum, ssCaps and ssScroll elements, which should indicate the state of NumLock, CapsLock and ScrollLock correspondingly. However under Win32 KeyDown/Up and MoudeUp/Down/Move events

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Alexander Klenin
2011/10/4 Flávio Etrusco flavio.etru...@gmail.com: However under Win32 KeyDown/Up and MoudeUp/Down/Move events do not recieve these elements, while MouseWheel events do. See http://bugs.freepascal.org/view.php?id=20065. Also there are duplicate functions in Forms and Controls units (apart

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Flávio Etrusco
On Mon, Oct 3, 2011 at 11:48 AM, Alexander Klenin kle...@gmail.com wrote: 2011/10/4 Flávio Etrusco flavio.etru...@gmail.com: However under Win32 KeyDown/Up and MoudeUp/Down/Move events do not recieve these elements, while MouseWheel events do. See http://bugs.freepascal.org/view.php?id=20065.

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Alexander Klenin
2011/10/4 Flávio Etrusco flavio.etru...@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

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Flávio Etrusco
On Mon, Oct 3, 2011 at 1:05 PM, Alexander Klenin kle...@gmail.com wrote: 2011/10/4 Flávio Etrusco flavio.etru...@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

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Alexander Klenin
2011/10/4 Flávio Etrusco flavio.etru...@gmail.com: BTW, does Delphi support ssAltGr and ssWin? No: http://docwiki.embarcadero.com/VCL/en/Classes.TShiftState However, in this case I think Delphi is wrong, since those are real modifiers. -- Alexander S. Klenin --

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Flávio Etrusco
On Mon, Oct 3, 2011 at 1:43 PM, Alexander Klenin kle...@gmail.com wrote: 2011/10/4 Flávio Etrusco flavio.etru...@gmail.com: BTW, does Delphi support ssAltGr and ssWin? No: http://docwiki.embarcadero.com/VCL/en/Classes.TShiftState However, in this case I think Delphi is wrong, since those are

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Alexander Klenin
2011/10/4 Flávio Etrusco flavio.etru...@gmail.com: Hmm, since Borland itself introduced new modifiers (touch, pen, etc), shouldn't we consider code that relies on the original enum constants to be broken? First, the code which relies on original enum elements will not be broken by addition of

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Hans-Peter Diettrich
Alexander Klenin schrieb: 2011/10/4 Flávio Etrusco flavio.etru...@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

Re: [Lazarus] TShiftState lock states in mousewheel events

2011-10-03 Thread Hans-Peter Diettrich
Alexander Klenin schrieb: 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. AFAIR GetAsyncKeyState encodes both the key