Jump to content
The simFlight Network Forums

Why no event for joystick button release


Recommended Posts


I am a registered user of FSUIPC7, with which I have been able to make lots of things for years.
I thank the authors a lot for this excellent software.

Today, I have got a small difficulty :

I want to use the "ENG1" button of my Airbus Throttle TCA (from Thrustmaster).
I wrote a Lua script with
   event.button ("H" , 2 , "my function") .

When I push the button, the event accesses correctly to "My Function" .
But when I release the button, there is no managed event.
Nothing happens (checked in the log of the console)

I also tried "event.button ("H" , 2 , downup,  "my function") : again no reaction on release.

Now, I tried to use Assignments + Buttons (in the menu) , with assigning one lua for Button-press and a second lua for Button-release.
It works perfectly well. 

Do you have an idea of why it works with KeyPress and not with event.button ?
Thank you in advance.

Link to comment
Share on other sites

12 hours ago, michel78320 said:

I also tried "event.button ("H" , 2 , downup,  "my function") : again no reaction on release.

To receive button presses and release, the format is:
    event.button ("H" , 2 , 3,  "my function")

The downup is a parameter and should be one of the following values (as described in the documentation):

Except for the button “255” case, the optional “downup” parameter specifies the change to be detected:

Omitted when pressed
1 when pressed
2 when released
3 when pressed or released (see Note * below


Link to comment
Share on other sites

Thank you for this very clear answer.

Indeed, I misinterpreted the documentation. Sorry !
Your example is very clear. Thank you.

FSUIPC is a wonderful program, which makes it possible to do what MSFS does not know how to do ...
I use Hvars and Lvars to interface all my hardware modules (Open Cockpit, VRinsight and CP-Flight) under MSFS.
That's wonderful, and your support is at the top.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.