This are the (new) Support Forums for FSUIPC and related products.

These forums replace the old support forums which have been running for 20+ years. The old forums contain a wealth of information on all FSUIPC products, and are still available (until the end of the year) for read-only here.

At the moment these new forums are quite empty – I will be updating the FAQ section and copying across the User Contributions from the old forums in the next few months.

Please note that you will need to Register and Login to post for support, and also to download attachments. You can view these forums without registering.

Support is also available via Discord. Please use the following invite link to join the FSUIPC Discord server:
                           https://discord.gg/zjwUTrxmmE

Notifications
Clear all

Generic triple use for buttons (single, double and long press)

(@fsuipc-support)
Posts: 86
Moderator
Topic starter
 

Hey guys, based on the TripleUse.lua i tried to get an more generic and easier to configure script.

This supports to easily assign lua functions to button presses but not only for the rising or falling edge of the signal but also for double-press (like doubleclick) or for long press.

It is based on Pete's TripleUse.lua but extended to be able to call the funtions that were already defined in other lua scripts like the ones coming with LINDA.

You can just refer to it and re-use all the additional stuff like writing something to VRInsight panel displays etc.

--[[
    1=BU0836A Interface
    2=MFG Crosswind V2
    3=FCU / Lights
    5=Joystick
    7=Controller (GAME FOR WINDOWS >)

    btnFunc is an multi-dimensional array (lua:table) containing data in the format

    { joy, button, singlePressFunctionName, doublePressFunctionName, longPressFunctionName }

    use function name "ignore" to mark an status as unused.
]]


btnFunc = {
    { 3, 7, "DeIce_PITOT_on", "ignore", "DeIce_PITOT_off"},
    { 5, 3, "APU_STARTER", "APU_EXTINGUISH_FIRE", "APU_OFF_SWITCH"}
}

In the 2nd line of the btnFunc "Table"/ array you can see, that the Joystick button three has the APU assigned that way:

  • single short press: APU start
  • double short presses: APU extinguisher fires
  • long press: APU is switched off.

Of course that list / array with buttons can be easily extended to all recognized "USB_Gamecontroller_Buttons".

I published the more generic TripleUse.lua and TripleUseAssignments.lua on Github.

See:  https://github.com/joeherwig/msfs-fsuipc-lua-scripts

Probably someone might find that useful.
Thanks Pete for your support!

Joe

[Originally posted on old SimMarket support forums by joeherwig]


 
Posted : November 6, 2025 3:59 pm