XML format changes, so that bindings are always mode-specific. Added
[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   </mode>
69
70   <!-- Mode 2: view mode -->
71   <mode n="2">
72    <cursor>left-right</cursor>
73    <constrained>true</constrained>
74
75    <!-- left button centres the view heading offset -->
76    <button n="0">
77     <binding>
78      <command>property-assign</command>
79      <property>/sim/view/offset-deg</property>
80      <value>0</value>
81     </binding>
82    </button>
83
84    <!-- middle button centres the view pitch offset -->
85    <button n="1">
86     <binding>
87      <command>property-assign</command>
88      <property>/sim/view/tilt-deg</property>
89      <value>0</value>
90     </binding>
91    </button>
92
93    <!-- right button switches modes -->
94    <button n="2">
95     <binding>
96      <command>property-assign</command>
97      <property>/input/mice/mouse[0]/mode</property>
98      <value>0</value>
99     </binding>
100    </button>
101
102    <!-- x-axis moves the view heading offset -->
103    <x-axis>
104     <binding>
105      <command>property-adjust</command>
106      <property>/sim/view/offset-deg</property>
107      <factor type="double">-360</factor>
108      <min type="double">0</min>
109      <max type="double">360</max>
110      <wrap type="bool">true</wrap>
111     </binding>
112    </x-axis>
113
114    <!-- y-axis moves the view pitch offset -->
115    <y-axis>
116     <binding>
117      <command>property-adjust</command>
118      <property>/sim/view/tilt-deg</property>
119      <factor type="double">-180</factor>
120      <min type="double">-90</min>
121      <max type="double">90</max>
122      <wrap type="bool">false</wrap>
123     </binding>
124    </y-axis>
125
126   </mode>
127
128  </mouse>
129
130 </PropertyList>