Re: GetAsyncKeyState

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday May 9 2008 23:30:36 vitamin wrote:
> L. Rahyen wrote:
> > On Thursday May 8 2008 17:09:28 vitamin wrote:
> > > Getting "global" key states are bad.
> > > If you really have to do that, then you doing something really wrong.
> >
> > 	Actually sometimes there is valid reasons for getting global key states.
> > For example, Mousotron really needs this to be fixed to be fully usable.
>
> The stuff that "needs" global key events called "key logger".

	Not necessary. In my example, - Mousotron, - collects number of keypresses, 
it doesn't log anything (it even lacks statistical logging). In real world 
this program is useful to see how much text you wrote today or how actively 
you used your mouse.

> If something _needs_ those events, they should use LL_HOOKs (keyboard and
> mouse). Constantly polling GetAsyncKeyState() doesn't guarantee anything
> and is a really bad practice. It's even bad to use that function to check
> state of the keys at any given point of time.

	Well, fact is that (unfortunately) not all developers of Windows programs 
really care about good design or good practice. BTW, I'm not sure how exactly 
Mousotron works (I didn't actually tried to debug it) so therefore I'm not 
sure does it uses this function or not; I just think that there is might be a 
such possibility.


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux