A32X: Add Keyboard Mode
This commit is contained in:
parent
26f35e652f
commit
1483f8e3f4
4 changed files with 175 additions and 7 deletions
170
A320-main.xml
170
A320-main.xml
|
@ -850,30 +850,194 @@
|
|||
<keyboard>
|
||||
<key n="49">
|
||||
<name>1</name>
|
||||
<desc>Captain View</desc>
|
||||
<desc>Captain View/Elevator Trim Up</desc>
|
||||
<binding>
|
||||
<condition>
|
||||
<not><property>/options/system/keyboard-mode</property></not>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/view-number</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
</condition>
|
||||
<command>property-adjust</command>
|
||||
<property>/controls/flight/elevator-trim</property>
|
||||
<step>-0.001</step>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="50">
|
||||
<name>2</name>
|
||||
<desc>First Officer View</desc>
|
||||
<desc>First Officer View/Elevator Up</desc>
|
||||
<binding>
|
||||
<condition>
|
||||
<not><property>/options/system/keyboard-mode</property></not>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/view-number</property>
|
||||
<value>8</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
setprop("/controls/flight/elevator", getprop("/controls/flight/elevator") - 0.05);
|
||||
</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="51">
|
||||
<name>3</name>
|
||||
<desc>Overhead View</desc>
|
||||
<desc>Overhead View/Throttle Decrease</desc>
|
||||
<binding>
|
||||
<condition>
|
||||
<not><property>/options/system/keyboard-mode</property></not>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/view-number</property>
|
||||
<value>9</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
setprop("/controls/engines/engine[0]/throttle", getprop("/controls/engines/engine[0]/throttle") - 0.01);
|
||||
setprop("/controls/engines/engine[1]/throttle", getprop("/controls/engines/engine[0]/throttle") - 0.01); # Not a typo, always use engine[0] as a reference
|
||||
</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="52">
|
||||
<name>4</name>
|
||||
<desc>Aileron Left</desc>
|
||||
<!--binding>
|
||||
<condition>
|
||||
<not><property>/options/system/keyboard-mode</property></not>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/view-number</property>
|
||||
<value></value>
|
||||
</binding-->
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
setprop("/controls/flight/aileron", getprop("/controls/flight/aileron") - 0.05);
|
||||
</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="53">
|
||||
<name>5</name>
|
||||
<desc>Center Controls</desc>
|
||||
<!--binding>
|
||||
<condition>
|
||||
<not><property>/options/system/keyboard-mode</property></not>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/view-number</property>
|
||||
<value></value>
|
||||
</binding-->
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
setprop("/controls/flight/aileron", 0);
|
||||
setprop("/controls/flight/elevator", 0);
|
||||
setprop("/controls/flight/rudder", 0);
|
||||
</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="54">
|
||||
<name>6</name>
|
||||
<desc>Aileron Right</desc>
|
||||
<!--binding>
|
||||
<condition>
|
||||
<not><property>/options/system/keyboard-mode</property></not>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/view-number</property>
|
||||
<value></value>
|
||||
</binding-->
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
setprop("/controls/flight/aileron", getprop("/controls/flight/aileron") + 0.05);
|
||||
</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="55">
|
||||
<name>7</name>
|
||||
<desc>Elevator Trim Down</desc>
|
||||
<!--binding>
|
||||
<condition>
|
||||
<not><property>/options/system/keyboard-mode</property></not>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/view-number</property>
|
||||
<value></value>
|
||||
</binding-->
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
</condition>
|
||||
<command>property-adjust</command>
|
||||
<property>/controls/flight/elevator-trim</property>
|
||||
<step>0.001</step>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="56">
|
||||
<name>8</name>
|
||||
<desc>Elevator Down</desc>
|
||||
<!--binding>
|
||||
<condition>
|
||||
<not><property>/options/system/keyboard-mode</property></not>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/view-number</property>
|
||||
<value></value>
|
||||
</binding-->
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
setprop("/controls/flight/elevator", getprop("/controls/flight/elevator") + 0.05);
|
||||
</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="57">
|
||||
<name>9</name>
|
||||
<desc>Throttle Increase</desc>
|
||||
<!--binding>
|
||||
<condition>
|
||||
<not><property>/options/system/keyboard-mode</property></not>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/sim/current-view/view-number</property>
|
||||
<value></value>
|
||||
</binding-->
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
setprop("/controls/engines/engine[0]/throttle", getprop("/controls/engines/engine[0]/throttle") + 0.01);
|
||||
setprop("/controls/engines/engine[1]/throttle", getprop("/controls/engines/engine[0]/throttle") + 0.01); # Not a typo, always use engine[0] as a reference
|
||||
</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="127">
|
||||
<name>DEL</name>
|
||||
|
|
|
@ -49,6 +49,13 @@
|
|||
|
||||
<hrule/>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Keyboard Mode: Maps flight controls to number pad, and number rows, instead of view shortucts.</label>
|
||||
</text>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Key Commands:</label>
|
||||
|
|
|
@ -359,9 +359,6 @@
|
|||
<checkbox>
|
||||
<label>Keyboard Mode (See Aircraft Help)</label>
|
||||
<halign>left</halign>
|
||||
<enable>
|
||||
<property>/systems/acconfig/unused</property>
|
||||
</enable>
|
||||
<property>/options/system/keyboard-mode</property>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
|
|
|
@ -1 +1 @@
|
|||
1534
|
||||
1535
|
Reference in a new issue