Orbiter key and axis bindings

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
669
Reaction score
32
Points
43
Hello,

I'm just thinking about how to create a good joystick support (even for HOTAS systems) for Orbiter and I think I found a solution how this could be managed in a good way, but therefore an API support is required or someone needs to create a new common library etc.

The problem in simulations which are simulating different vessels is, that each vessel is individual. That means, that you can have different axis and keys for each vessel. Some vessels have gears, some vessels not. Some vessels have a hover engine which can be regulated by an axis, some vessels not.
For example for those who have used X-plane, there are so many different key and axis that it's hard to handle all this settings and you need to change the settings if you want to fly another aircraft.
In X-Plane, all the functions which are possible for an airplane are shown in more or less one dialog.

The solution could be to have individual key bindings for each add-on, as DCS did it.
Therefore it's required to not define the "keys" in the vessel class for example, but the vessel class needs to define the supported "input function", and the key has to be assigned by the user in a dialog (and to be stored in a config file for sure).

For example, for a Deltaglieder you can define a function "HoverEngineLevel" and you can assign an axis to it.
Additional, you can define a function "increase hover engine" and define a button for this function.
This methods/functions/intrefaces needs to be implemented into the Deltaglieder class for sure.

But the definition between function and input key / axis should not be done in the vessel class (I know that it's possible by the api today), but in a dialog of the launch pad or maybe even in an in game dialog.

Therefore, we need methods as "VesselInputFunction f = vessel->getInputFunctions()" for example (To list the supported input functions). Then this vessel function needs methods like "String s = vesselInputFunction->GetName()". (To display the name of the function in the binding dialog)

This could be done this way not only for vessels, but for nearly all orbiter add-ons. For example, even a MFD mode, because the MFD also has buttons and can also support axis.

However, in the configuration dialog it should be possible then to select the add-on from a drop down list which can be a Vessel, MFDMode, etc. and assign buttons and axis to the plugin to the functions the add-on provides.

I'm sorry I don't know how to create the software architecture for this in the best way.
I hope somebody can understand me and I know that it is not so easy to do this and maybe older addons cannot be handled anymore...

What will be the best way in your mind?
 
Last edited:
Back
Top