I want to play idle-action games (like Witcher I or FTL) with a single hand. These games are both action and idle because you can press spacebar to stop action and think about strategy and what to do next. This pause cannot be remapped to mouse in-game and that is why I asking here. In Ubuntu, is there any possible way how to fake spacebar input every time I press 4th mouse button?
Note: I'm running these games using wine
I think you will want to install imwheel as discussed in ManyButtonsMouseHowto under the Mapping More Buttons section. imwheel should allow you to "define application-specific actions to your additional mouse buttons".
So using imwheel you should be able to remap the button to whatever you want and have it only behave like that in the applications you want, in your case FTL and Witcher.