http://bugs.winehq.org/show_bug.cgi?id=29857
Bug #: 29857 Summary: GetAsyncKeyState says Escape key is permanently down once it has been pressed Product: Wine Version: 1.3.28 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: silas-wine@flatline.org.uk Classification: Unclassified
I am debugging a Windows application that has a long-running processing thread which periodically checks for interrupts using
GetAsyncKeyState(VK_ESCAPE) < 0
This worked fine on WINE 1.2.2, but on 1.3.28 the app kept behaving as if it were interrupted immediately when it had not been. Further investigation showed that, after Escape has been pressed just once, any future calls to GetAsyncKeyState (no matter how many events have been processed in the meantime) always return ffff8001. In other words, if you press Escape just once while running your app, any future calls that app makes to GetAsyncKeyState(VK_ESCAPE) will behave as though the Escape key is still down. Again this does not happen with WINE 1.2.2, only with 1.3.28.
I was able to work around this bug by adding a call to GetKeyState(VK_ESCAPE) just before the test for GetAsyncKeyState(VK_ESCAPE) < 0. I ignored the return value of GetKeyState (http://msdn.microsoft.com/en-us/library/windows/desktop/ms646301%28v=vs.85%2... says it should be called in response to a message; it doesn't say what happens if it's called when there has been no message, so I assume we can't rely on it to return meaningful values if called at just any time) however somehow the presence of the GetKeyState call caused WINE 1.3.28's GetAsyncKeyState to behave correctly.
http://bugs.winehq.org/show_bug.cgi?id=29857
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru 2012-02-10 10:03:43 CST --- If this is a regression please post the results of your regression testing: http://wiki.winehq.org/RegressionTesting
http://bugs.winehq.org/show_bug.cgi?id=29857
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic.delanoy@gmail.com
--- Comment #2 from Frédéric Delanoy frederic.delanoy@gmail.com 2012-02-10 10:45:43 CST --- (In reply to comment #1)
If this is a regression please post the results of your regression testing: http://wiki.winehq.org/RegressionTesting
Also try with latest wine first (1.4-rc2 as of today)
http://bugs.winehq.org/show_bug.cgi?id=29857
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com 2012-03-31 02:10:25 CDT --- Please, can you read & try the program from: http://bugs.winehq.org/show_bug.cgi?id=5623#c34
Does it get stuck in that example? Open 2 winecfgs and the program in a console and play a bit with keyboard/mouse in one of the winecfgs and then press ESC and see if the console program shows an infinite amount of dots.
As far as I remember you may have the permanent effect of a key press if your application is locked in a sleep call.
http://bugs.winehq.org/show_bug.cgi?id=29857
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Abandoned?
--- Comment #4 from Frédéric Delanoy frederic.delanoy@gmail.com 2013-06-07 07:25:51 CDT --- Please retest with recent wine (1.5.31 or later) and run a regression test if the issue persists (http://wiki.winehq.org/RegressionTesting).
If you don't, this bug will be abandoned soon.
http://bugs.winehq.org/show_bug.cgi?id=29857
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |ABANDONED
--- Comment #5 from Ken Sharp imwellcushtymelike@gmail.com --- Abandoned.
http://bugs.winehq.org/show_bug.cgi?id=29857
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Frédéric Delanoy frederic.delanoy@gmail.com --- Closing