Consider the following scenario:
Notes
- You use the AttachThreadInput function to attach the input processing mechanism of a thread to the input processing mechanism of another thread.
- You press a key or click a mouse button.
- When the input notification message (such as WM_KEYDOWN, WM_SYSKEYDOWN, or WM_LBUTTONDOWN) is being processed, you perform one of the following operations:
- You use the AttachThreadInput function to reattach the input processing mechanism to the current thread.
- You create a window that is owned by a window in a different thread or process.
- A call is made to the GetKeyState function.
Notes
- This issue affects any application that uses the GetKeyState function or the KeyState property in this scenario.
- This issue does not affect the GetMessage and PeekMessage functions.
- This issue may affect the TranslateMessage function and the keyboard character messages if the key that you press is a modifier key (such as Alt, Shift, Ctrl, or Caps Lock).