Debian Codegraph @

Aircraft/Generic/WalkView/walk-view-keys.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Walk view module for FlightGear.
4
5 Copyright (C) 2010 - 2013 Anders Gidenstam (anders(at)gidenstam.org)
6 This file is licensed under the GPL license v2 or later.
7 -->
8 <PropertyList>
9
10 <!--
11 This module can be used to add suitable key bindings for walk views
12 to any aircraft.
13
14 Usage example:
15
16 Include it in the keybord section of the aircraft's -set file.
17
18 <keyboard include="Aircraft/Generic/WalkView/walk-view-keys.xml">
19
20
21 Note: If the aircraft use other custom key bindings for the same keys
22 the walk view bindings should be merged into the aircraft specific
23 bindings. The walk view API commands return false if not currently
24 in a walk view so the other alternative action can be put in an
25 if statement. E.g.
26 if (!walkview.forward(4.0)) {
27 # Perform the non-walk view action of this key.
28 }
29 -->
30
31 <!-- Keyboard commands -->
32 <key n="87">
33 <name>W</name>
34 <desc>Walk view: Run forward.</desc>
35 <binding>
36 <command>nasal</command>
37 <script>
38 if (!walkview.forward(4.0)) {
39 }
40 </script>
41 </binding>
42 <mod-up>
43 <binding>
44 <command>nasal</command>
45 <script>
46 walkview.forward(0);
47 </script>
48 </binding>
49 </mod-up>
50 </key>
51
52 <key n="119">
53 <name>w</name>
54 <desc>Walk view: Walk forward.</desc>
55 <binding>
56 <command>nasal</command>
57 <script>
58 if (!walkview.forward(1.0)) {
59 }
60 </script>
61 </binding>
62 <mod-up>
63 <binding>
64 <command>nasal</command>
65 <script>
66 walkview.forward(0);
67 </script>
68 </binding>
69 </mod-up>
70 </key>
71
72 <key n="100">
73 <name>d</name>
74 <desc>Walk view: Side step right.</desc>
75 <repeatable type="bool">true</repeatable>
76 <binding>
77 <command>nasal</command>
78 <script>
79 if (!walkview.side_step(0.5)) {
80 }
81 </script>
82 </binding>
83 <mod-up>
84 <binding>
85 <command>nasal</command>
86 <script>
87 walkview.side_step(0);
88 </script>
89 </binding>
90 </mod-up>
91 </key>
92
93 <key n="68">
94 <name>D</name>
95 <desc>Walk view: Fast side step right.</desc>
96 <repeatable type="bool">true</repeatable>
97 <binding>
98 <command>nasal</command>
99 <script>
100 if (!walkview.side_step(1.0)) {
101 }
102 </script>
103 </binding>
104 <mod-up>
105 <binding>
106 <command>nasal</command>
107 <script>
108 walkview.side_step(0);
109 </script>
110 </binding>
111 </mod-up>
112 </key>
113
114 <key n="97">
115 <name>a</name>
116 <desc>Walk view: Side step left.</desc>
117 <repeatable type="bool">true</repeatable>
118 <binding>
119 <command>nasal</command>
120 <script>
121 if (!walkview.side_step(-0.5)) {
122 }
123 </script>
124 </binding>
125 <mod-up>
126 <binding>
127 <command>nasal</command>
128 <script>
129 walkview.side_step(0);
130 </script>
131 </binding>
132 </mod-up>
133 </key>
134 <key n="65">
135 <name>A</name>
136 <desc>Walk view: Fast side step left.</desc>
137 <repeatable type="bool">true</repeatable>
138 <binding>
139 <command>nasal</command>
140 <script>
141 if (!walkview.side_step(-1.0)) {
142 }
143 </script>
144 </binding>
145 <mod-up>
146 <binding>
147 <command>nasal</command>
148 <script>
149 walkview.side_step(0);
150 </script>
151 </binding>
152 </mod-up>
153 </key>
154
155 <key n="115">
156 <name>s</name>
157 <desc>Walk view: Walk backwards.</desc>
158 <binding>
159 <command>nasal</command>
160 <script>
161 if (!walkview.forward(-1.0)) {
162 controls.startEngine(1);
163 }
164 </script>
165 </binding>
166 <mod-up>
167 <binding>
168 <command>nasal</command>
169 <script>
170 walkview.forward(0);
171 controls.startEngine(0);
172 </script>
173 </binding>
174 </mod-up>
175 </key>
176 <!-- Remove this if you for some reason have 2d panels and want the default
177 Swap panels function on 'S'.
178 -->
179 <!-- key n="83">
180 <name>S</name>
181 <desc>Walk view: Walk backwards.</desc>
182 <binding>
183 <command>nasal</command>
184 <script>
185 walkview.forward(-1.0);
186 </script>
187 </binding>
188 <mod-up>
189 <binding>
190 <command>nasal</command>
191 <script>
192 walkview.forward(0);
193 </script>
194 </binding>
195 </mod-up>
196 </key -->
197
198 </PropertyList>