I am developing a Quickwin program that allows user input using either keystrokes or mousemovement. The technique is to have the main program process mouse movements using the (blocking) function WaitOnMouseEvent, while a second thread watches for keystrokes. I have modeled this using the sample program PeekApp. See attached.
I cannot get this to work properly. When the !! lines are commented (i.e. no 2nd thread) it works, reporting the mouse position every time it is moved. But if II lines are uncommented, a mouse movement only results in the status message "Mouse input pending in unit 5" and it is blocked until a keystroke is made. It appears to me that a GETCHARQQ statement in the second thread is blocking the execution of the first thread.
If I comment the WaitOnMouseEvent line, the program works fine: the (bogus) mouse position is reported every time through the loop, while any keystrokes made are detected by the second thread and reported.
Am I doing something wrong, or is this a bug, or is this behavior simply a limitation of Quickwin? The documentation implies it should work.
(btw, I tried to insert the main program MyPeekApp here but could not obtain suitable results--everything was double spaced with many unintended line breaks. How does one do this?)