https://bugs.winehq.org/show_bug.cgi?id=39291
Bug ID: 39291 Summary: Games made with Game Maker (8.1 Standard) have Key Mapping issues Product: Wine Version: 1.7.51 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: andrewsuicune@gmail.com
In Wine 1.7.51 (and earlier), with games made in Game Maker (including but not limited to 8.1 Standard), some key mappings do not work as intended.
For example, a game that uses the Z key works fine on Windows but on Mac, hitting the key does absolutely nothing.
The only exception I can tell as of the moment is that the ESC key works as intended and is able to quit the given program successfully.
I tested three different games made by different people, so I believe that this is not limited to a specific game but may affect multiple games made using the engine. Some of the games were made with newer versions of Game Maker (Studio) while others were made with older versions (8.1 Standard).
https://bugs.winehq.org/show_bug.cgi?id=39291
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ken@codeweavers.com
--- Comment #1 from Ken Thomases ken@codeweavers.com --- What is your system language and locale? What keyboard layout are you using?
Can you collect a +tid,+key,+keyboard,+nls log as per points 10.1 and 10.2 here http://wiki.winehq.org/FAQ#get_log and attach it? Do the minimum necessary to reproduce the problem and explain what that was (e.g. "pressed the Z key").
Thanks.
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #2 from Andrew Fan andrewsuicune@gmail.com --- English Language and Locale, Standard Mac keyboard layout.
Attached are two logs of one of the games I tested - a normal output log and the debug log. Please note that a lot of the output (in the normal log) is made by the game engine and not wine. In this game, I was able to confirm that Left Shift and the arrow keys work as intended. However, the Z key does not seem to work.
(In reply to Ken Thomases from comment #1)
What is your system language and locale? What keyboard layout are you using?
Can you collect a +tid,+key,+keyboard,+nls log as per points 10.1 and 10.2 here http://wiki.winehq.org/FAQ#get_log and attach it? Do the minimum necessary to reproduce the problem and explain what that was (e.g. "pressed the Z key").
Thanks.
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #3 from Andrew Fan andrewsuicune@gmail.com --- Created attachment 52376 --> https://bugs.winehq.org/attachment.cgi?id=52376 Normal Output log for Midnight Sparkle RaNGE 14 Contest (a program made with Game Maker Studio)
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #4 from Andrew Fan andrewsuicune@gmail.com --- Created attachment 52377 --> https://bugs.winehq.org/attachment.cgi?id=52377 Wine Debug Trace for Midnight Sparkle RaNGE 14 Contest (a program made with Game Maker Studio)
+tid,+key,+keyboard,+nls
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #5 from Ken Thomases ken@codeweavers.com --- Thanks for those logs.
Are you using an Asian input method (e.g. Pinyin, Hiragana, etc.)? Your keystrokes are being routed through imm32 and being sent for processing through an input method. I'm not sure if this is something the game could be doing explicitly or if it's because the Mac driver thinks you're using an input method.
If you're not using an input method, do you have any third-party software for intercepting keys and doing something with them? It might be acting as an input method or some other kind of non-keyboard-layout input source.
If you can disable any input method or other such software and test, the problem might go away. See System Preferences > Keyboard > Input Sources and/or the Input menu in the menu bar.
Otherwise, can you collect a +tid,+key,+keyboard,+imm log?
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #6 from Andrew Fan andrewsuicune@gmail.com --- OH you're right. I completely forgot that I've been using Japanese input (Kotoeri). However, I'm using Romaji, which maps (for every other program I've ever used, native to MacOSX and other programs run in Wine) to the normal English keys, and I've never had a problem with any other program using this particular input style.
However, if I transfer back to a US input, the Z key works normally.
This issue could be Game Maker not working with the Japanese Input system I'm using (not a problem with Wine but rather a compatibility issue with Game Maker itself), or it could be a problem with Wine and the Kotoeri input.
I'm sorry if this is actually an invalid issue, but I don't actually have a copy of Windows to test on. It may be worth noting that some of the others I know who ran the game on Windows used Japanese input as their default and did not report any problems but the input method may be different on Mac, so I don't know if that makes a difference.
(In reply to Ken Thomases from comment #5)
Thanks for those logs.
Are you using an Asian input method (e.g. Pinyin, Hiragana, etc.)? Your keystrokes are being routed through imm32 and being sent for processing through an input method. I'm not sure if this is something the game could be doing explicitly or if it's because the Mac driver thinks you're using an input method.
If you're not using an input method, do you have any third-party software for intercepting keys and doing something with them? It might be acting as an input method or some other kind of non-keyboard-layout input source.
If you can disable any input method or other such software and test, the problem might go away. See System Preferences > Keyboard > Input Sources and/or the Input menu in the menu bar.
Otherwise, can you collect a +tid,+key,+keyboard,+imm log?
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #7 from Ken Thomases ken@codeweavers.com --- (In reply to Andrew Fan from comment #6)
OH you're right. I completely forgot that I've been using Japanese input (Kotoeri). However, I'm using Romaji, which maps (for every other program I've ever used, native to MacOSX and other programs run in Wine) to the normal English keys, and I've never had a problem with any other program using this particular input style.
However, if I transfer back to a US input, the Z key works normally.
This issue could be Game Maker not working with the Japanese Input system I'm using (not a problem with Wine but rather a compatibility issue with Game Maker itself), or it could be a problem with Wine and the Kotoeri input.
I'm sorry if this is actually an invalid issue, but I don't actually have a copy of Windows to test on. It may be worth noting that some of the others I know who ran the game on Windows used Japanese input as their default and did not report any problems but the input method may be different on Mac, so I don't know if that makes a difference.
It might be a problem with the Mac driver and/or Wine's implementation of imm32. For esoteric reasons, the Mac driver specifically checks whether an input method is active and, if so, routes key events differently. I'm also not sure what's happening after we feed the 'z' keystroke into the input method. For Romaji, I would expect that it would immediately tell Wine to insert a 'z' character. I don't know if it's not doing that or if it is and the game is not prepared to accept that.
Could you please collect a +tid,+event,+key,+keyboard,+imm log with Romaji enabled? Again, just do the minimum to illustrate the problem, although it might be instructive if you press the Return key after attempting to type a 'z'. Thanks.
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #8 from Andrew Fan andrewsuicune@gmail.com --- Created attachment 52378 --> https://bugs.winehq.org/attachment.cgi?id=52378 Wine Debug Trace for Midnight Sparkle RaNGE 14 Contest (a program made with Game Maker Studio) No 2
+tid,+event,+key,+keyboard,+imm
Arrow keys, shift, Z, and return were all hit.
https://bugs.winehq.org/show_bug.cgi?id=39291
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aric@codeweavers.com
--- Comment #9 from Ken Thomases ken@codeweavers.com --- Thanks for that log. It shows that the Mac driver is sending the Z keystroke through the input method and the input method is giving us back the character 'Z', as expected. That should eventually result in the game getting the Z character in a WM_CHAR message, I think.
I'm bringing in Aric, who is our imm32 expert. Aric, can you tell from the log what's happening once the Mac driver handles its IM_SET_TEXT event? I'm seeing it post WM_IME_CHAR. What's supposed to happen after that?
https://bugs.winehq.org/show_bug.cgi?id=39291
Andrew Fan andrewsuicune@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Games made with Game Maker |Games made with Game Maker |(8.1 Standard) have Key |(8.1 Standard) have Key |Mapping issues |Mapping issues with Kotoeri
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #10 from Aric Stewart aric@codeweavers.com --- So the process for handling Input that is routed though the IME is a lot more convoluted so there are lots of places where it can break.
I see the keystroke for 'Z' is properly headed into Kotoeri where is it properly returning 'Z' that ends up into an IME Composition string where it is sent to the application, which is not handling it so it ends back up into the IME code where it is broken down into an WM_IME_CHAR messages and sent back to the application.
If the Application sends the WM_IME_CHAR to DefWindowProc then it would get reposted as a WM_CHAR message.
I cannot see from your log if the WM_IME_CHAR is being translated into a WM_CHAR or not. but there are 2 likely places where the game is falling down.
1) It tries to handle the WM_IME_CHAR message and is getting confused
2) It does not handle WM_CHAR message and expects keystrokes to come in as keystrokes (WM_KEYDOWN etc...)
When the IME processes the keystrokes the KEYDOWN/KEYUP messages are not delivered to the application, just the resulting characters.
The reason that arrow keys would work is because the arrow keys are not handled by the IME so the IME reports that it is not consuming the keystroke and it is handled as normal.
If under windows the Japanese Input Method, set to romaji, still works then it is likely because they have their input method working specifically to handle this, but I would believe that you would see the same behavior.
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #11 from Andrew Fan andrewsuicune@gmail.com --- Still present in 1.7.52
If any further logs are required, I will gladly produce them. If this bug is invalid and has to do with the way the game engine works rather than Wine, then please close it as invalid.
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #12 from Andrew Fan andrewsuicune@gmail.com --- Still present in 2.0-rc1
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #13 from Aric Stewart aric@codeweavers.com --- (In reply to Andrew Fan from comment #12)
Still present in 2.0-rc1
You have not had a chance to test this on Japanese Windows, or windows with the Microsoft IME installed in Romaji mode have you? It is hard to tell if this is really a bug or not without that test.
https://bugs.winehq.org/show_bug.cgi?id=39291
--- Comment #14 from Andrew Fan andrewsuicune@gmail.com --- I don't have access to either.
(In reply to Aric Stewart from comment #13)
(In reply to Andrew Fan from comment #12)
Still present in 2.0-rc1
You have not had a chance to test this on Japanese Windows, or windows with the Microsoft IME installed in Romaji mode have you? It is hard to tell if this is really a bug or not without that test.