Jump to content
The simFlight Network Forums

Long button presses?


Recommended Posts

Hi,

is there a way to activate a 2nd action when a button is pressed and held for some time, e.g. 500ms? Like in a car radio where pressing a memory storage switches to the station, but holding the same key programs that memory to the current frequency.

Concrete, the 1st action (control) must only be take place when the button is released after a short time, as the 2nd action is only fired after that longer time. Further release action may occur.

I read the advanced manual, but don't see a possibility there by now.

I have some Saitek devices and SPAD gave me that idea to use the long press on my yoke and throttle buttons as well (as SPAD offers this for the panels).

I appreciate any answer!

Eik

Link to comment
Share on other sites

is there a way to activate a 2nd action when a button is pressed and held for some time, e.g. 500ms?

Yes, but only by using a Lua plug-in. Take a look at the example supplied and installed in your Lua plugins Zip. It's called "TripleUse.lua". It's one I made for my own use and gives different results for a single quick press and release, a double quick press and release, and a longer press and hold before release. I'm sure you can adapt that to whatever you need.

Regards

Pete

Link to comment
Share on other sites

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.