Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Holding a Button

Featured Replies

Is there anyway to program it to just hold the button when I hold the button? If I do repeat it repeatedly presses the input. I just want to hold it down. 

  • Commercial Member
47 minutes ago, Vingilot said:

Is there anyway to program it to just hold the button when I hold the button? If I do repeat it repeatedly presses the input. I just want to hold it down. 

? Then don't activate "repeat"? Button Down and Button Up are handled separately in AAO, and a button is "held" - as long as you hold it.

I'm sorry, but I don't understand what you are trying to do. Can you provide specifics? (=what are you trying to control in the sim and how exactly is it supposed to work?)

Generally speaking, the simulator doesn't support buttons either that you have to hold down for a specific amount of time. The aircraft developers implement those with the help of local variables, counters and timers. That is what you would have to replicate in AAO, probably using RPN scripts. I dimly remember one of those in the JustFlight 146. But I don't recall exactly which one and how it had to be coded in AAO.

Edited by Lorby_SI

LORBY-SI

  • Author
21 minutes ago, Lorby_SI said:

? Then don't activate "repeat"? Button Down and Button Up are handled separately in AAO, and a button is "held" - as long as you hold it.

I'm sorry, but I don't understand what you are trying to do. Can you provide specifics? (=what are you trying to control in the sim and how exactly is it supposed to work?)

Generally speaking, the simulator doesn't support buttons either that you have to hold down for a specific amount of time. The aircraft developers implement those with the help of local variables, counters and timers. That is what you would have to replicate in AAO, probably using RPN scripts. I dimly remember one of those in the JustFlight 146. But I don't recall exactly which one and how it had to be coded in AAO.

That is not how it is working on my end. I want to bind a hold down trim release in the H145 This should be held down as long as you want to have manual controls overriding the programmed autopilot stuff. However the program just sends a single button press to MSFS. It releases the button and the mode. Nothing is set in key up, and I am holding down the button. 

  • Author

Might be worth noting that other holds also do not work as you described for me. Trim for example, if I hold down a trim hat switch it will only keep trimming if I set it to repeat. It will just send one iteration if I have it as normal. 

  • Commercial Member
2 hours ago, Vingilot said:

Might be worth noting that other holds also do not work as you described for me. Trim for example, if I hold down a trim hat switch it will only keep trimming if I set it to repeat. It will just send one iteration if I have it as normal. 

And that is exactly how it is supposed to work. "Repeat" = it keeps trimming, as long as you hold down the button - by repeating the trim command. "No Repeat" = it sends one event, and another event when you release the button. (Key Down and Key Up on the button assignment dialog)

Again: you cannot "hold down" simulator events, they are always "one shots".

Quote

 I want to bind a hold down trim release in the H145 This should be held down as long as you want to have manual controls overriding the programmed autopilot stuff. 

That doesn't sound like a default event.
This will be custom code, specific only to this aircraft. So the first thing to find out is how exactly this feature works on the H145 and then replicate that code in an RPN script. What exactly are you assigning to control this feature of the H145? Where is that button in the cockpit? What triggers it?
It is entirely possible that this can't be done at all with external controls (= when the developers use O: or I: variables to control this "timeout"). 

Edited by Lorby_SI

LORBY-SI

  • Author

Ah then I do not know how they make it work differently for the H145. 

That helicopter comes with a key replacement software which binds some of the more unused buttons in the sim to actions for the helicopter. You can do this custom, but it also has the really important stuff prebound. In this case it has release cyclic trim set to " Toggle Engine 4 Anti Ice". So if I bind that function to a key in the controls section of the sim and hold it down it will allow me to move freely without disrupting the trim selection. The trim will then reengage the moment i let go of the button. But as said it does not work if bound via Axis and Ohs. It seems like this is not currently possible, and I ill not hold it against you. I would have liked it bound via Axis and ohs because then it auto changes when I get in an appropriate aircraft. 

Thank you for answering my questions. If you can think of a way to still do this, or if anyone else reading it does pleas e let me know 🙂

  • Commercial Member
38 minutes ago, Vingilot said:

But as said it does not work if bound via Axis and Ohs.

The controller logic in MSFS and what AAO is allowed to do over SimConnect are two completely different things. They are not related and not comparable.

If they built the H145 logic around the MSFS input events, then your only option is to use virtual events in AAO and assign them in MSFS to the input that the H145 expects (=virtual keyboard presses, vJoy or ViGEm). So AAO picks up your external button and then sends a fake keyboard or joystick button event to the sim.

There might be another chance if there is a BVar involved here. But the code in the H145 files is massively obfuscated and it is next to impossible to find out what is happening where. Is there a button in the cockpit that can be pressed with the mouse? Then one could take a look in MSFS developer mode.

Edited by Lorby_SI

LORBY-SI

  • Author

That worked! Thank you! (the virtual button event) Works perfectly now. There's no clickable button in the cockpit because it is on the stick which moves around a lot and would be hard to reach with a  mouse. It is in an awkward spot for that as well. But yeah this works so problem fixed. Thank you so much!

  • Commercial Member
7 hours ago, Vingilot said:

There's no clickable button in the cockpit

That's too bad. If there was, there is a chance to find out the input trigger (BVar, HVar or script with LVars) by hovering the mouse over it in MSFS developer mode and pressing Crtl&G, while using the "Windows->Behaviors" dialog

Edited by Lorby_SI

LORBY-SI

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.