User:Zexe

From FlightGear wiki
Revision as of 03:00, 19 July 2009 by Zexe (Talk | contribs) (Configuring Keybindings)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Configuring keyboard binding for Fgcom [Spacebar]

Backup your files before editing them. These instructions are meant for Windows XP sp2. My Flightgear folder is in C:\program files.

Reason to change keybinding [Space] to a different key: Some planes already have a default function using the [Space] bar. Example planes would be the Dave's hangar planes and the hovercraft Bluebird, Pressing [Space] in these planes causes other functions to occur and neutralizes the Fgcom function. So it is imperative to change the keybinding if you would like to utilize Fgcom on these planes.

How to change the keybindings: Go to Program files and open the Flightgear folder. Then open the Data folder. Continue by opening keyboard.xml. Use Wordpad as your editing application.

 c:\program files\flightgear\data\keyboard.xml


Background information: Most of the information can be found already on wiki flightgear. But this is just to reiterate how the keyboard configuration works.

<key n="43">
<name>+</name> 

43 is tied to [ + ]. They are bonded to each other. They cannot be seperated. If you input <key n="44"> with <name>+</name>, this key configuration will fail. Rule of thumb, when copying and pasting, be sure to copy and paste the number and the symbol together as a couple.

Press Ctrl + F to open the Find box. Type 'space' and locate the keybinding for 'Push to Talk'. Now you know where the keybinding is to talk. We must find a different and hopefully useless keybinding to substitute. Since I hate the Warp function in Flightgear, we'll use this. So search for Warp:

<key n="87">
 <name>W</name> 
 <desc>Decrease warp</desc> 
<binding>
 <command>property-adjust</command> 
 <property>/sim/time/warp</property> 
 <step type="int">-60</step> 
 </binding>
 </key>  

Copy : - <key n="87"> <name>W</name>

Paste over- <key n="43"> ***Note***This number 43 responds to a different key, So please ignore it.

 <name>Space</name> 
 <desc>PTT - Push To Talk (via VoIP)</desc> 
<binding>
 <command>nasal</command> 
 <script>space(1, modifiers.getValue())</script> 
 </binding>
<mod-up>
<binding>
 <command>nasal</command> 
 <script>space(0, modifiers.getValue())</script> 
 </binding>
 </mod-up>
<mod-shift>
<binding>
 <command>nasal</command> 
 <script>space(1, modifiers.getValue())</script> 
 </binding>
<mod-up>
<binding>
 <command>nasal</command> 
 <script>space(0, modifiers.getValue())</script> 
 </binding>
 </mod-up>
 </mod-shift>
 </key>

Result should look like:

<key n="87">
 <name>W</name> 
 <desc>PTT - Push To Talk (via VoIP)</desc> 
<binding>
 <command>nasal</command> 
 <script>space(1, modifiers.getValue())</script> 
 </binding>
<mod-up>
<binding>
 <command>nasal</command> 
 <script>space(0, modifiers.getValue())</script> 
 </binding>
 </mod-up>
<mod-shift>
<binding>
 <command>nasal</command> 
 <script>space(1, modifiers.getValue())</script> 
 </binding>
<mod-up>
<binding>
 <command>nasal</command> 
 <script>space(0, modifiers.getValue())</script> 
 </binding>
 </mod-up>
 </mod-shift>
 </key>

Go back to the original <key n="87">

            		<name>W</name>

Change the number to something over 350 or delete the function:

<key n="87">
 <name>W</name> 
 <desc>Decrease warp</desc> 
<binding>
 <command>property-adjust</command> 
 <property>/sim/time/warp</property> 
 <step type="int">-60</step> 
 </binding>
 </key>

Save file and quit and test Flightgear Fgcom with the new configured key.