I'm sure many of you will be aware by now that the Unity game engine has suffered problems with Linux support lately. One of those issues to do with keyboard input does actually have a workaround.

What happens, is that you might bring up a chat box and attempt to type "Hello", but it will end up as "Hheelllloo" as it's detecting more keystrokes than it should be. This also affects character movement in games too, like holding SHIFT to run will end up repeatedly switching between walk and run as if you're tapping the key constantly. It causes a lot of other issues too, it's quite a nuisance.

The fix is quite simple, if you add this as a launch option in Steam for the affected games:

XMODIFIERS='' %command%

Or for games not on Steam:

XMODIFIERS='' ./game_executable

That has been tested by myself and others and it really does fix it. From what I understand, it's an issue with "ibus", which is installed along with GNOME and it should be fixed in the latest stable version of Unity from what developers have told me.

The issue causes some games to be practically unplayable, until developers work on a fix themselves or upgrade Unity. Both can end up taking rather a long time!

Update: As it turns out, the issue stems from multiple bugs in SDL2. They affected Unity's build of SDL2 as they had Ibus and fctix turned off as per this bug report. I spoke with Marc from Unity (previously from Feral) who submitted the patch, which has been accepted upstream into SDL2. The rest (like this fix) has already been solved in SDL2 and merged into Unity already in the latest version.

With thanks to Steff for the tip.