Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Is there a way to insert delays between key presses? MSFS seems very finicky about it's configured keyboard shortcuts (and a kludge with what it does with them). For example Alt+0 "loads saved camera 0" so I would simply expect a second press to do nothing. Instead it return to the default camera (even if you pan-ed away). As I result I'd like to send two Alt+0 to center the view (one to return to default camera - which it shouldn't be doing but so it does, and the second to return to the saved camera). This seems unreliable with a sequence, I assume because of how fast it happens. I'd like to insert a delay between them.

Posted
10 hours ago, pilotjohn said:

Is there a way to insert delays between key presses?

Not using key press assignments. You can achieve this using lua scripts, by using ipc.keypress (or ipc.keypressplus) and ipc.sleep for the delay. You would then have to assign a different key press (or button) to activate the lua script.

Posted
On 9/16/2020 at 4:17 AM, John Dowson said:

Not using key press assignments. You can achieve this using lua scripts, by using ipc.keypress (or ipc.keypressplus) and ipc.sleep for the delay. You would then have to assign a different key press (or button) to activate the lua script.

Feature request please: be able to do this without having to create 100+ Lua scripts (or one giant one). Maybe adding a param after the key as the delay, and they could be executed in the order listed in the INI.

  • Confused 1
  • 1 month later...
Posted

@pilotjohn Rather than confusing the button/key definition with adding syntax for a delay, I've decided to add a pause control (C1152). You can use this to add a delay either before or after a keypress or button assignment, by overloading the assignment. Here's an example of inserting a delay between two controls being sent (to control the 3-way off->Taxi->LNG lights toggle in the TBM930):

Quote

34=PT,11,C65751,0     -{LANDING_LIGHTS_TOGGLE}-
35=PT,11,C66240,0     -{TOGGLE_TAXI_LIGHTS}-
36=UT,11,C65751,0     -{LANDING_LIGHTS_TOGGLE}-
37=UT,11,C1152,600     -{}-
38=UT,11,C66240,0     -{TOGGLE_TAXI_LIGHTS}-
39=PT,12,C66240,0     -{TOGGLE_TAXI_LIGHTS}-
40=UT,12,C66240,0     -{TOGGLE_TAXI_LIGHTS}-
 

The parameter to the control is the delay in milliseconds (600ms in the above example).

(NB. there is minor issue in that the FSUIPC added controls are currently not annotated/commented correctly)

This added control is available in version 7.0.2a attached below.

Cheers,

John

FSUIPC7.exe

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.