http://bugs.winehq.org/show_bug.cgi?id=24220
Summary: GetKeyboardState doesn't work Product: Wine Version: 1.3.1 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: stampoon@gmail.com
simple code:
#include <windows.h> int main() { unsigned char keystate[256]; GetKeyboardState(keystate); for (int i = 0; i <= 256; i++) { if (keystate[i] == 1) printf("%d%s",i,"\n"); } return 0; }
compile with "i586-pc-mingw32-gcc test.c --std=c99" on wine nothing in std output on winxp: 2 4 16 17 32 40 65 73 76 78 79 82 83 85 86 90 144 160 162 186 220 240 243 246 251
http://bugs.winehq.org/show_bug.cgi?id=24220
--- Comment #1 from Jeff Zaroyko jeffz@jeffz.name 2010-08-31 07:05:03 CDT --- Your test has an error, GetKeyboardState returns 'BOOL', you need to check if it failed by testing it against 0. I don't have access to a Wine environment right now, but perhaps you should fix your test and retry.
http://bugs.winehq.org/show_bug.cgi?id=24220
--- Comment #2 from stampoon stampoon@gmail.com 2010-08-31 07:13:21 CDT --- (In reply to comment #1)
Your test has an error, GetKeyboardState returns 'BOOL', you need to check if it failed by testing it against 0. I don't have access to a Wine environment right now, but perhaps you should fix your test and retry.
I add "if (GetKeyboardState(keystate) != 0) printf("%s","not fail");", but "not fail" prints to std, aka GetKeyboardState returns TRUE.
http://bugs.winehq.org/show_bug.cgi?id=24220
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2010-08-31 10:21:11 CDT --- What is exactly the problem? With what application? GetKeyboardState() certainly works in Wine.
http://bugs.winehq.org/show_bug.cgi?id=24220
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
http://bugs.winehq.org/show_bug.cgi?id=24220
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|download, testcase |
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2010-08-31 10:48:03 CDT --- There is nothing to download, that's not a test case.
http://bugs.winehq.org/show_bug.cgi?id=24220
--- Comment #5 from stampoon stampoon@gmail.com 2010-08-31 11:56:16 CDT --- (In reply to comment #3)
What is exactly the problem? With what application? GetKeyboardState() certainly works in Wine.
Hmm..If I do it in while (TRUE) loop and pressing some keys nothing changes, all elements of array keystate are "0".. Is it normal? PS Sorry for my bad english.
http://bugs.winehq.org/show_bug.cgi?id=24220
--- Comment #6 from Dmitry Timoshkov dmitry@codeweavers.com 2010-08-31 23:09:37 CDT --- (In reply to comment #5)
Hmm..If I do it in while (TRUE) loop and pressing some keys nothing changes, all elements of array keystate are "0".. Is it normal? PS Sorry for my bad english.
That's normal if you don't run a message loop.
http://bugs.winehq.org/show_bug.cgi?id=24220
--- Comment #7 from butraxz@gmail.com 2013-06-09 11:48:08 CDT --- This has not been updated for over 900 days.
Is this still an issue in 1.6-rc1 or higher or is this abandoned ?
https://bugs.winehq.org/show_bug.cgi?id=24220
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |ABANDONED
--- Comment #8 from Austin English austinenglish@gmail.com --- (In reply to butraxz from comment #7)
This has not been updated for over 900 days.
Is this still an issue in 1.6-rc1 or higher or is this abandoned ?
Abandoned.
https://bugs.winehq.org/show_bug.cgi?id=24220
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Austin English austinenglish@gmail.com --- Closing.