ProblemWhen you play steam games on Linux with Wine and having the in-game Steam Community enabled, the game may crash when hitting any key. The main problem is, there's a dll called "imm32.dll", that's an internal dll of windows. The dll's API is not documented, so the wine develeopers cannot reimplement this library very well. You can read more about the bug here. I found three solutions to solve this Problem:
Solution 1: The simple WaySimply disable the Steam Community for the specific game. Right click the game, choose Properties and uncheck "Enable Steam Community in game". The disadvantage is, you can't use multiplayer than.
Solution 2: The native-dll way
After some tests, this way do not work.
Solution 3: The compilation wayYou simple "patch" the source code of the official open source imm32.dll of wine.
$ git clone git://source.winehq.org/git/wine.git ~/wine-git
$ cd ~/wine-git
Optional, but highly recommented:
$ nano Makefile
and change "prefix = ..." to "prefix = /tmp/wine".
do the same with "ac_default_prefix = ..." in the file "configure".
Now apply the patch:
$ nano dlls/imm32/imm.c
Search for this line: "BOOL WINAPI ImmProcessKey("...
and insert after the "TRACE("... line this new line:
Please to not forget the ";" char.
Thats all! Now compile:
$ make depend
$ make install
If you are using PlayOnLinux, you can simply add a new wine version:
$ cp -r /tmp/wine ~/.PlayOnLinux/wine/linux-x86/1.7.x-imm-patch
In PlayOnLinux, select the Steam entry and press on the configure button in the menu bar and select the wine version "1.7.x-imm-patch".