BUG: Multiple SendKeys Statements Turn Off NumLock KeyLast reviewed: February 10, 1998Article ID: Q179987 |
The information in this article applies to:
SYMPTOMSExecuting at least two SendKeys statements in a row results in turning off the NumLock key. This problem may also affect the CapsLock and ScrollLock keys.
CAUSEThis problem deals with a nesting of capturing the keyboard state. The first SendKeys statement takes a snapshot of the keyboard state and turns off all toggles. The second SendKeys statement executes before the first one played out all keys and restored the keyboard state. So, the keyboard state is recorded again by the second SendKeys, this time with all toggles still off. Eventually, the keyboard state is restored to the later state (toggles off).
RESOLUTIONTo work around this problem, do one of the following:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
REFERENCES"Visual Basic 5.0 Programmer's Guide to the Win32 API," by Dan Appleman Chapter 6: Hardware and System Functions For additional information, see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q177674 TITLE : HOWTO: Toggle the NUM LOCK, CAPS LOCK, and SCROLL LOCK Keys Keywords : kbprg GnrlVB vbwin vb4win vb5all vb4all Version : WINDOWS:4.0,5.0 Platform : WINDOWS Issue type : kbbug Solution Type : kbpending |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |