Since a change of FSUIPC6 my Script was unable to perform key-presses in GSX. The GSX menu opened up but nothing happend. This have been fixed with v6.0.10 but you have to add an option in fsuipc6.ini to use key presses in FSUIPC6.
Find you fsuipc6.ini file:
.\My Documents\Prepar3D v5 Add-Ons\FSUIPC6\FSUIPC6.ini
Open the file with an TextEditor and add in Section [General]
LuaTrapKeyEvent=No
References: