Added bindings for elevator and ailerons in mode 1, as in current
[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
31    <button n="0">
32     <binding>
33      <command>pui-or-panel-mouse-click</command>
34      <button>0</button>
35      <is-down>true</is-down>
36     </binding>
37     <mod-up>
38      <binding>
39       <command>pui-or-panel-mouse-click</command>
40       <button>0</button>
41       <is-down>false</is-down>
42      </binding>
43     </mod-up>
44    </button>
45
46    <button n="2">
47     <binding>
48      <command>property-assign</command>
49      <property>/input/mice/mouse[0]/mode</property>
50      <value>1</value>
51     </binding>
52    </button>
53
54   </mode>
55
56   <mode n="1">
57    <cursor>crosshair</cursor>
58    <constrained>true</constrained>
59
60    <button n="2">
61     <binding>
62      <command>property-assign</command>
63      <property>/input/mice/mouse[0]/mode</property>
64      <value>2</value>
65     </binding>
66    </button>
67
68    <!-- x-axis moves the ailerons -->
69    <x-axis>
70     <binding>
71      <command>property-adjust</command>
72      <property>/controls/aileron</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    </x-axis>
79
80    <!-- y-axis moves the elevator -->
81    <y-axis>
82     <binding>
83      <command>property-adjust</command>
84      <property>/controls/elevator</property>
85      <factor>-2.0</factor>
86      <min type="double">-1.0</min>
87      <max type="double">1.0</max>
88      <wrap type="bool">false</wrap>
89     </binding>
90    </y-axis>
91
92   </mode>
93
94   <!-- Mode 2: view mode -->
95   <mode n="2">
96    <cursor>left-right</cursor>
97    <constrained>true</constrained>
98
99    <!-- left button centres the view heading offset -->
100    <button n="0">
101     <binding>
102      <command>property-assign</command>
103      <property>/sim/view/offset-deg</property>
104      <value>0</value>
105     </binding>
106    </button>
107
108    <!-- middle button centres the view pitch offset -->
109    <button n="1">
110     <binding>
111      <command>property-assign</command>
112      <property>/sim/view/tilt-deg</property>
113      <value>0</value>
114     </binding>
115    </button>
116
117    <!-- right button switches modes -->
118    <button n="2">
119     <binding>
120      <command>property-assign</command>
121      <property>/input/mice/mouse[0]/mode</property>
122      <value>0</value>
123     </binding>
124    </button>
125
126    <!-- x-axis moves the view heading offset -->
127    <x-axis>
128     <binding>
129      <command>property-adjust</command>
130      <property>/sim/view/offset-deg</property>
131      <factor type="double">-360</factor>
132      <min type="double">0</min>
133      <max type="double">360</max>
134      <wrap type="bool">true</wrap>
135     </binding>
136    </x-axis>
137
138    <!-- y-axis moves the view pitch offset -->
139    <y-axis>
140     <binding>
141      <command>property-adjust</command>
142      <property>/sim/view/tilt-deg</property>
143      <factor type="double">-180</factor>
144      <min type="double">-90</min>
145      <max type="double">90</max>
146      <wrap type="bool">false</wrap>
147     </binding>
148    </y-axis>
149
150   </mode>
151
152  </mouse>
153
154 </PropertyList>