2002-03-23 22:30:39 +00:00
|
|
|
<?xml version="1.0"?>
|
2002-03-25 11:59:26 +00:00
|
|
|
<!--
|
|
|
|
Mouse binding definitions.
|
|
|
|
|
2004-06-24 14:45:48 +00:00
|
|
|
This is a independent configuration file: it is not part of the main
|
|
|
|
FlightGear property tree.
|
2002-03-25 11:59:26 +00:00
|
|
|
|
|
|
|
Currently, Glut supports only one mouse, but the configuration format
|
2004-06-24 14:45:48 +00:00
|
|
|
is designed to support additional mice in the future if possible. The
|
|
|
|
current mode for each mouse is held in the
|
2002-03-27 22:51:13 +00:00
|
|
|
/devices/status/mice/mouse[n]/mode property.
|
2002-03-25 11:59:26 +00:00
|
|
|
-->
|
|
|
|
|
2002-03-23 22:30:39 +00:00
|
|
|
<PropertyList>
|
|
|
|
|
2002-03-25 11:59:26 +00:00
|
|
|
<mouse n="0">
|
|
|
|
|
2013-02-10 14:39:18 +00:00
|
|
|
<mode-count type="int">4</mode-count>
|
2002-03-25 11:59:26 +00:00
|
|
|
<mode archive="y" type="int">0</mode>
|
|
|
|
|
2002-03-26 12:49:14 +00:00
|
|
|
|
|
|
|
<mode n="0">
|
|
|
|
<cursor>inherit</cursor>
|
2002-04-09 10:45:47 +00:00
|
|
|
<constrained type="bool">false</constrained>
|
|
|
|
<pass-through type="bool">true</pass-through>
|
2002-03-26 12:49:14 +00:00
|
|
|
|
2009-11-16 20:40:20 +00:00
|
|
|
<button n="0">
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<property>/sim/menubar/autovisibility/enabled</property>
|
|
|
|
</condition>
|
|
|
|
<command>property-assign</command>
|
2009-11-16 20:51:38 +00:00
|
|
|
<property>/sim/menubar/visibility</property>
|
2009-11-16 20:40:20 +00:00
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2002-03-26 12:49:14 +00:00
|
|
|
<button n="2">
|
|
|
|
<binding>
|
2013-03-07 19:36:54 +00:00
|
|
|
<command>cycle-mouse-mode</command>
|
|
|
|
<reason>right-click</reason>
|
2002-03-26 12:49:14 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
2014-01-19 22:29:25 +00:00
|
|
|
|
|
|
|
<!-- extra buttons control FoV -->
|
|
|
|
<!-- these are often assigned to mouse-wheel motion in Linux -->
|
|
|
|
<button n="3">
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[2]</property>
|
|
|
|
<not><property>/sim/mouse/right-button-mode-cycle-enabled</property></not>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>view.decrease()</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="4">
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[2]</property>
|
|
|
|
<not><property>/sim/mouse/right-button-mode-cycle-enabled</property></not>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>view.increase()</script>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2013-02-10 14:39:18 +00:00
|
|
|
|
2002-03-26 12:49:14 +00:00
|
|
|
</mode>
|
|
|
|
|
|
|
|
<mode n="1">
|
|
|
|
<cursor>crosshair</cursor>
|
2002-04-09 10:45:47 +00:00
|
|
|
<constrained type="bool">true</constrained>
|
|
|
|
<pass-through type="bool">false</pass-through>
|
2002-03-26 12:49:14 +00:00
|
|
|
|
|
|
|
<button n="2">
|
|
|
|
<binding>
|
2013-03-07 19:36:54 +00:00
|
|
|
<command>cycle-mouse-mode</command>
|
|
|
|
<reason>right-click</reason>
|
2002-03-26 12:49:14 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2002-05-02 14:08:26 +00:00
|
|
|
<!-- extra buttons control elevator trim -->
|
|
|
|
<!-- these are often assigned to mouse-wheel motion in Linux -->
|
|
|
|
<button n="3">
|
|
|
|
<binding>
|
|
|
|
<command>property-adjust</command>
|
2003-04-01 12:41:12 +00:00
|
|
|
<property>/controls/flight/elevator-trim</property>
|
2002-05-02 14:08:26 +00:00
|
|
|
<step type="double">0.01</step>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="4">
|
|
|
|
<binding>
|
|
|
|
<command>property-adjust</command>
|
2003-04-01 12:41:12 +00:00
|
|
|
<property>/controls/flight/elevator-trim</property>
|
2002-05-02 14:08:26 +00:00
|
|
|
<step type="double">-0.01</step>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2002-03-27 22:51:13 +00:00
|
|
|
<!-- Mouse left/right motion. -->
|
2002-03-26 13:17:32 +00:00
|
|
|
<x-axis>
|
2002-03-27 22:51:13 +00:00
|
|
|
|
|
|
|
<!-- No buttons pressed: control ailerons -->
|
2002-03-26 13:17:32 +00:00
|
|
|
<binding>
|
2002-03-27 22:51:13 +00:00
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[0]</property>
|
|
|
|
</not>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</not>
|
|
|
|
</and>
|
|
|
|
</condition>
|
2002-03-26 13:17:32 +00:00
|
|
|
<command>property-adjust</command>
|
2003-04-01 12:41:12 +00:00
|
|
|
<property>/controls/flight/aileron</property>
|
2002-04-09 10:45:47 +00:00
|
|
|
<factor type="double">4.0</factor>
|
2002-03-26 13:17:32 +00:00
|
|
|
<min type="double">-1.0</min>
|
|
|
|
<max type="double">1.0</max>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
2002-03-27 22:51:13 +00:00
|
|
|
|
|
|
|
<!-- Left button pressed: control rudder -->
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[0]</property>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</not>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
<command>property-adjust</command>
|
2003-04-01 12:41:12 +00:00
|
|
|
<property>/controls/flight/rudder</property>
|
2002-04-09 10:45:47 +00:00
|
|
|
<factor type="double">4.0</factor>
|
2002-03-27 22:51:13 +00:00
|
|
|
<min type="double">-1.0</min>
|
|
|
|
<max type="double">1.0</max>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
|
2002-03-26 13:17:32 +00:00
|
|
|
</x-axis>
|
|
|
|
|
2002-03-27 22:51:13 +00:00
|
|
|
<!-- Mouse up/down motion -->
|
2002-03-26 13:17:32 +00:00
|
|
|
<y-axis>
|
2002-03-27 22:51:13 +00:00
|
|
|
|
|
|
|
<!-- No buttons pressed: control elevator -->
|
2002-03-26 13:17:32 +00:00
|
|
|
<binding>
|
2002-03-27 22:51:13 +00:00
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[0]</property>
|
|
|
|
</not>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</not>
|
|
|
|
</and>
|
|
|
|
</condition>
|
2002-03-26 13:17:32 +00:00
|
|
|
<command>property-adjust</command>
|
2003-04-01 12:41:12 +00:00
|
|
|
<property>/controls/flight/elevator</property>
|
2002-04-09 10:45:47 +00:00
|
|
|
<factor type="double">-4.0</factor>
|
2002-03-26 13:17:32 +00:00
|
|
|
<min type="double">-1.0</min>
|
|
|
|
<max type="double">1.0</max>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
2002-03-27 22:51:13 +00:00
|
|
|
|
|
|
|
<!-- Middle button pressed: control throttle -->
|
|
|
|
<binding>
|
2003-12-22 20:05:18 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>controls.throttleMouse()</script>
|
2002-03-27 22:51:13 +00:00
|
|
|
</binding>
|
2002-03-26 13:17:32 +00:00
|
|
|
</y-axis>
|
|
|
|
|
2002-03-26 12:49:14 +00:00
|
|
|
</mode>
|
|
|
|
|
|
|
|
<!-- Mode 2: view mode -->
|
|
|
|
<mode n="2">
|
|
|
|
<cursor>left-right</cursor>
|
2002-04-09 10:45:47 +00:00
|
|
|
<constrained type="bool">true</constrained>
|
|
|
|
<pass-through type="bool">false</pass-through>
|
2002-03-26 12:49:14 +00:00
|
|
|
|
2005-10-23 16:00:06 +00:00
|
|
|
<!-- left button centres view direction; middle + left also resets view point -->
|
2002-03-26 12:49:14 +00:00
|
|
|
<button n="0">
|
|
|
|
<binding>
|
2007-08-01 21:10:04 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
view.resetViewDir();
|
|
|
|
view.resetFOV();
|
|
|
|
</script>
|
2005-10-23 16:00:06 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</condition>
|
2007-08-01 21:10:04 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
view.resetViewPos();
|
|
|
|
</script>
|
2002-03-26 12:49:14 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- right button switches modes -->
|
|
|
|
<button n="2">
|
|
|
|
<binding>
|
2013-03-07 19:36:54 +00:00
|
|
|
<command>cycle-mouse-mode</command>
|
|
|
|
<reason>right-click</reason>
|
2002-03-23 22:30:39 +00:00
|
|
|
</binding>
|
2002-03-26 12:49:14 +00:00
|
|
|
</button>
|
2013-03-07 19:36:54 +00:00
|
|
|
|
2013-02-10 14:39:18 +00:00
|
|
|
|
2009-03-13 21:45:34 +00:00
|
|
|
<!-- extra buttons control FoV -->
|
2002-05-02 14:08:26 +00:00
|
|
|
<!-- these are often assigned to mouse-wheel motion in Linux -->
|
|
|
|
<button n="3">
|
|
|
|
<binding>
|
2009-03-13 21:45:34 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>view.decrease()</script>
|
2002-05-02 14:08:26 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button n="4">
|
|
|
|
<binding>
|
2009-03-13 21:45:34 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>view.increase()</script>
|
2002-05-02 14:08:26 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2002-03-27 22:51:13 +00:00
|
|
|
<!-- Mouse left/right motion -->
|
2002-03-26 12:49:14 +00:00
|
|
|
<x-axis>
|
2002-03-27 22:51:13 +00:00
|
|
|
|
2005-01-28 15:17:30 +00:00
|
|
|
<!-- No buttons pressed: rotate the view left or right -->
|
2002-03-26 12:49:14 +00:00
|
|
|
<binding>
|
2002-03-27 22:51:13 +00:00
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[0]</property>
|
|
|
|
</not>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</not>
|
|
|
|
</and>
|
|
|
|
</condition>
|
2002-03-26 12:49:14 +00:00
|
|
|
<command>property-adjust</command>
|
2002-04-18 14:52:32 +00:00
|
|
|
<property>/sim/current-view/heading-offset-deg</property>
|
2002-03-26 12:49:14 +00:00
|
|
|
<factor type="double">-360</factor>
|
|
|
|
<min type="double">0</min>
|
|
|
|
<max type="double">360</max>
|
|
|
|
<wrap type="bool">true</wrap>
|
|
|
|
</binding>
|
2002-03-27 22:51:13 +00:00
|
|
|
|
2005-01-28 15:17:30 +00:00
|
|
|
|
|
|
|
<!-- Middle button pressed: move the view position left or right -->
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[0]</property>
|
|
|
|
</not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/x-offset-m</property>
|
|
|
|
<factor type="double">1</factor>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
|
2002-03-26 12:49:14 +00:00
|
|
|
</x-axis>
|
|
|
|
|
2002-03-27 22:51:13 +00:00
|
|
|
<!-- Mouse up/down motion -->
|
2002-03-26 12:49:14 +00:00
|
|
|
<y-axis>
|
2002-03-27 22:51:13 +00:00
|
|
|
|
|
|
|
<!-- No buttons pressed: tilt the view up and down -->
|
2002-03-26 12:49:14 +00:00
|
|
|
<binding>
|
2002-03-27 22:51:13 +00:00
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[0]</property>
|
|
|
|
</not>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</not>
|
|
|
|
</and>
|
|
|
|
</condition>
|
2002-03-26 12:49:14 +00:00
|
|
|
<command>property-adjust</command>
|
2002-04-18 14:52:32 +00:00
|
|
|
<property>/sim/current-view/pitch-offset-deg</property>
|
2002-03-26 12:49:14 +00:00
|
|
|
<factor type="double">-180</factor>
|
|
|
|
<min type="double">-90</min>
|
|
|
|
<max type="double">90</max>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
2005-01-28 15:17:30 +00:00
|
|
|
|
2013-03-06 14:23:31 +00:00
|
|
|
<!-- Middle button pressed move the view up and down -->
|
2005-01-28 15:17:30 +00:00
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[0]</property>
|
|
|
|
</not>
|
2007-02-09 13:31:04 +00:00
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
2005-01-28 15:17:30 +00:00
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/y-offset-m</property>
|
|
|
|
<factor type="double">-1</factor>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
|
2002-03-26 12:49:14 +00:00
|
|
|
</y-axis>
|
|
|
|
|
2013-03-06 14:23:31 +00:00
|
|
|
<!-- Middle button and Ctrl pressed: move the view forward and backward -->
|
|
|
|
<y-axis-ctrl>
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[0]</property>
|
|
|
|
</not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</and>
|
|
|
|
</condition>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/z-offset-m</property>
|
|
|
|
<factor type="double">1</factor>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
</y-axis-ctrl>
|
|
|
|
|
2002-03-26 12:49:14 +00:00
|
|
|
</mode>
|
2002-03-25 11:59:26 +00:00
|
|
|
|
2013-02-10 14:39:18 +00:00
|
|
|
<!-- Mode 3: spring-loaded-view mode -->
|
|
|
|
<mode n="3">
|
|
|
|
<cursor>left-right</cursor>
|
|
|
|
<constrained type="bool">true</constrained>
|
|
|
|
<pass-through type="bool">false</pass-through>
|
|
|
|
|
|
|
|
<!-- Mouse left/right motion -->
|
|
|
|
<x-axis>
|
|
|
|
|
|
|
|
<!-- rotate the view left or right -->
|
|
|
|
<binding>
|
2013-08-22 13:13:50 +00:00
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</not>
|
|
|
|
</condition>
|
2013-02-10 14:39:18 +00:00
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/heading-offset-deg</property>
|
|
|
|
<factor type="double">-360</factor>
|
|
|
|
<min type="double">0</min>
|
|
|
|
<max type="double">360</max>
|
|
|
|
<wrap type="bool">true</wrap>
|
|
|
|
</binding>
|
|
|
|
|
2013-08-22 13:13:50 +00:00
|
|
|
<!-- Middle button pressed: move the view position left or right -->
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</condition>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/x-offset-m</property>
|
|
|
|
<factor type="double">1</factor>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
|
2013-02-10 14:39:18 +00:00
|
|
|
</x-axis>
|
|
|
|
|
|
|
|
<!-- Mouse up/down motion -->
|
|
|
|
<y-axis>
|
|
|
|
|
|
|
|
<!-- tilt the view up and down -->
|
|
|
|
<binding>
|
2013-08-22 13:13:50 +00:00
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</not>
|
|
|
|
</condition>
|
2013-02-10 14:39:18 +00:00
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/pitch-offset-deg</property>
|
|
|
|
<factor type="double">-180</factor>
|
|
|
|
<min type="double">-90</min>
|
|
|
|
<max type="double">90</max>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
|
2013-08-22 13:13:50 +00:00
|
|
|
<!-- Middle button pressed move the view up and down -->
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</condition>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/y-offset-m</property>
|
|
|
|
<factor type="double">-1</factor>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
|
2013-02-10 14:39:18 +00:00
|
|
|
</y-axis>
|
|
|
|
|
2013-08-22 13:13:50 +00:00
|
|
|
<y-axis-ctrl>
|
|
|
|
<!-- Middle button and Ctrl pressed: move the view forward and backward -->
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<property>/devices/status/mice/mouse[0]/button[1]</property>
|
|
|
|
</condition>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/z-offset-m</property>
|
|
|
|
<factor type="double">1</factor>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding>
|
|
|
|
<condition>
|
|
|
|
<not><property>/devices/status/mice/mouse[0]/button[1]</property></not>
|
|
|
|
</condition>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/y-offset-m</property>
|
|
|
|
<factor type="double">-1</factor>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
</y-axis-ctrl>
|
|
|
|
|
|
|
|
<x-axis-ctrl>
|
|
|
|
<binding>
|
|
|
|
<command>property-adjust</command>
|
|
|
|
<property>/sim/current-view/x-offset-m</property>
|
|
|
|
<factor type="double">1</factor>
|
|
|
|
<wrap type="bool">false</wrap>
|
|
|
|
</binding>
|
|
|
|
</x-axis-ctrl>
|
|
|
|
|
2013-02-10 14:39:18 +00:00
|
|
|
</mode>
|
|
|
|
|
|
|
|
</mouse> <!-- of mouse 0 -->
|
2002-03-23 22:30:39 +00:00
|
|
|
|
|
|
|
</PropertyList>
|
2002-04-19 01:12:34 +00:00
|
|
|
|