Jump to content
The simFlight Network Forums

enter key not being passed to lua script in MSFS2020


Recommended Posts

Posted

I use this script to time a pause in the game.  It worked up until 7.5.2 in both MSFS 2020 and MSFS 2024.  In 7.5.2 it did not work in either.  In 7.5.3 it started working in MFSF 2024.  It still does not work in MSFS 2020.

The Lau script doesn't seem to receive the "enter" in event.key #13.

 

If I roll back to 7.5.1 it works in both.

I have included the script (not written by me) and the log files.  The successful run is from MSFS 2024.

SetPauseMSFS&P3D.lua laulogdwc.log

  • John Dowson changed the title to enter key not being passed to lua script in MSFS2020
Posted
On 4/6/2025 at 8:26 PM, dc9116 said:

I use this script to time a pause in the game.  It worked up until 7.5.2 in both MSFS 2020 and MSFS 2024.  In 7.5.2 it did not work in either.  In 7.5.3 it started working in MFSF 2024.  It still does not work in MSFS 2020.

Ok, that is interesting...and implies the MSFS/Asobo documentation is wrong.
The input string used for the return/enter key in 7.5.1 and earlier versions was just "Enter". As these input strings have changed slightly in MSFS2024, I updated FSUIPC to allow different strings to be used for the different simulators in 7.5.2, and revised all strings against the MSFS documentation. For MSFS2024 the input string for this key is now documented as "VK_Return" (see https://docs.flightsimulator.com/msfs2024/html/6_Programming_APIs/SimConnect/API_Reference/InputEvents/SimConnect_MapInputEventToClientEvent_EX1.htm), and for MSFS2020 it is now documented as "VK_Enter" (see https://docs.flightsimulator.com/flighting/html/Programming_Tools/SimConnect/API_Reference/InputEvents/SimConnect_MapInputEventToClientEvent.htm).

So it looks like the documentation is wrong...I will check further here and either correct again and/or raise this with Asobo, and see if they will either correct to the documentation or update the documentation.

Note there was no change in this area from 7.5.2 to 7.5.3, so if its now working with 7.5.3 in MSFS2024 then that is due to an update in either the SDK or in MSFS2024.

I will update again after I have tested this further.

Thanks for reporting,

John
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.