You can try using SendInput to simulate a keystroke. It also simulate mouse movements. If the game is using directInput for all of its input then this may not work.