More cleanups. Removed the pui-* commands, and added a pass-through
[fg:toms-fgdata.git] / mice.xml
1 <?xml version="1.0"?>
2 <!--
3 Mouse binding definitions.
4
5 NOTE: CURRENTLY, THIS FILE IS USED ONLY IF YOU CONFIGURE FLIGHTGEAR
6 'with-new-mouse' AT BUILD TIME.
7
8 This file is included by preferences.xml, and uses the context of its
9 inclusion point; that means that you need to prepend "/input/mice"
10 to all property names.
11
12 Currently, Glut supports only one mouse, but the configuration format
13 is designed to support additional mice in the future if possible.
14
15 The current mode for each mouse is held in the
16 /input/mice/mouse[n]/mode property.
17 -->
18
19
20 <PropertyList>
21
22  <mouse n="0">
23
24   <mode-count type="int">3</mode-count>
25   <mode archive="y" type="int">0</mode>
26
27
28   <mode n="0">
29    <cursor>inherit</cursor>
30    <constrained>false</constrained>
31    <pass-through>true</pass-through>
32
33    <button n="2">
34     <binding>
35      <command>property-assign</command>
36      <property>/input/mice/mouse[0]/mode</property>
37      <value>1</value>
38     </binding>
39    </button>
40
41   </mode>
42
43   <mode n="1">
44    <cursor>crosshair</cursor>
45    <constrained>true</constrained>
46    <pass-through>false</pass-through>
47
48    <button n="2">
49     <binding>
50      <command>property-assign</command>
51      <property>/input/mice/mouse[0]/mode</property>
52      <value>2</value>
53     </binding>
54    </button>
55
56    <!-- x-axis moves the ailerons -->
57    <x-axis>
58     <binding>
59      <command>property-adjust</command>
60      <property>/controls/aileron</property>
61      <factor>2.0</factor>
62      <min type="double">-1.0</min>
63      <max type="double">1.0</max>
64      <wrap type="bool">false</wrap>
65     </binding>
66    </x-axis>
67
68    <!-- y-axis moves the elevator -->
69    <y-axis>
70     <binding>
71      <command>property-adjust</command>
72      <property>/controls/elevator</property>
73      <factor>-2.0</factor>
74      <min type="double">-1.0</min>
75      <max type="double">1.0</max>
76      <wrap type="bool">false</wrap>
77     </binding>
78    </y-axis>
79
80   </mode>
81
82   <!-- Mode 2: view mode -->
83   <mode n="2">
84    <cursor>left-right</cursor>
85    <constrained>true</constrained>
86    <pass-through>false</pass-through>
87
88    <!-- left button centres the view heading offset -->
89    <button n="0">
90     <binding>
91      <command>property-assign</command>
92      <property>/sim/view/offset-deg</property>
93      <value>0</value>
94     </binding>
95    </button>
96
97    <!-- middle button centres the view pitch offset -->
98    <button n="1">
99     <binding>
100      <command>property-assign</command>
101      <property>/sim/view/tilt-deg</property>
102      <value>0</value>
103     </binding>
104    </button>
105
106    <!-- right button switches modes -->
107    <button n="2">
108     <binding>
109      <command>property-assign</command>
110      <property>/input/mice/mouse[0]/mode</property>
111      <value>0</value>
112     </binding>
113    </button>
114
115    <!-- x-axis moves the view heading offset -->
116    <x-axis>
117     <binding>
118      <command>property-adjust</command>
119      <property>/sim/view/offset-deg</property>
120      <factor type="double">-360</factor>
121      <min type="double">0</min>
122      <max type="double">360</max>
123      <wrap type="bool">true</wrap>
124     </binding>
125    </x-axis>
126
127    <!-- y-axis moves the view pitch offset -->
128    <y-axis>
129     <binding>
130      <command>property-adjust</command>
131      <property>/sim/view/tilt-deg</property>
132      <factor type="double">-180</factor>
133      <min type="double">-90</min>
134      <max type="double">90</max>
135      <wrap type="bool">false</wrap>
136     </binding>
137    </y-axis>
138
139   </mode>
140
141  </mouse>
142
143 </PropertyList>