The GetInputState function determines whether there are mouse-button or keyboard messages in the calling thread’s message queue.
BOOL GetInputState(VOID)
This function has no parameters.
If the queue contains one or more new mouse-button or keyboard messages, the return value is nonzero.
If the there are no new mouse-button or keyboard messages in the queue, the return value is zero.