While cleaning up MiG-15 keybinds I found one that does not work because of <condition> in FGData's keyboard.xml, which is like:
<key n="83">
<name>S</name>
<desc>Swap panels</desc>
<binding>
<condition>
<not>
<property>/sim/allow-toggle-cockpit</property>
</not>
</condition>
<command>property-swap</command>
<property>/sim/panel/path</property>
<property>/sim/panel_2/path</property>
</binding>
<binding>
<condition>
<not>
<property>/sim/allow-toggle-cockpit</property>
</not>
</condition>
<command>panel-load</command>
</binding>
</key>
Aircraft-side binding is:
<key n="83">
<name>Shift-S</name>
<desc>Earth/Air Starter ignition type</desc>
<binding n="0">
<command>property-toggle</command>
<property>fdm/jsbsim/systems/leftpanel/ignition-type-input</property>
</binding>
</key>
and it does not work unless I --prop:/sim/allow-toggle-cockpit=false
Adding a <condition> that is true aircraft-side does not seem to help.
Diff:
Te generic 'S' binding is essntially obsolete, I would say (only relevant to old 2D panels).
But I susepct the larger bug is that when replacing a key-bindig in an aircraft, we don't clear out other children. Essentially, the way we replace keybindings is not very clever, it could benefit froma. re-design.
But old 2D panels are still there?
For now I could find a workaround for aircraft not using 2D panels:
starting from
<binding n="2">instead of just<binding>or<binding n="0">.Yes you could just use binding n=2 or n=99 since the other binding is basically inactive.