--- In [email protected], [EMAIL PROTECTED] wrote:
>
> > I don't think it's an extended key problem as GetKeyState uses
> > vkcodes, not scancodes. Anyway, I noticed that if I turned on the
> > check box "Disable numlock" in pproconf, Keytrap.GetKeystate(1,144)
> > indeed always returned 1 (:this was the first time I ever touched).
> 
> You're right. If you set the GUI Control, the GetKeyState reports what
> you've told powerpro to do (why I was always getting a 1 for the state,
> because I had the checkbox grey checked). It's just not toggling the
actual
> state of the key and led though.
> 
> There is no *Keys for numlock (just {capslock} and {scrolllock}) so
> I can't test with *Keys.

Maybe it's a remnant of Win 9x, which has only keybd_event, no
SendInput, and keybd_event in win 9x couldn't toggle the NumLock key
while nt could, according the documentation (the extended key nature
of the numlock really might be the cause in this case).

> This does work to toggle the key state and led though:
> keytrap.sendkeys(69,144,0)  ;;numlock keydown
> keytrap.sendkeys(69,144,1)  ;;numlock keyup
> 
> So somehow powerpro is forcing the Keystate to what it thinks it
> should be, but that keytrap.GetKeyState is not the same as the
> actual key state.

It seems that sometimes the toggle report in GetKeyState is not the
actual toggle state, but relative to some reference state at a given
time: once I screwed up somehow, GetKeyState is starting to report the
opposite of the genuine toggle state, at least for numlock, i.e., 0
for toggle on, 1 for toggle off. So, if you're gonna to rely on this
info afterwards, you must adjust the toggle state appropriately first.

Sean





Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to