Hacks
How to change key bindings
Thought there's no fancy key binding tools available on Mac yet, it doesn't mean you cannot change the key bindings yourself.
Editing keyboard configuration file
FlightGear has a keyboard configuration file at /Applications/FlightGear.app/Contents/Resources/data/keyboard.xml. Don't forget to backup the file before you get started.
The basic structure of a key binding
1: <key n="1">
2: <name>Ctrl-A</name>
3: <desc>Toggle autopilot altitude lock.</desc>
4: <binding>
5: <command>nasal</command>
6: <script>
7: node = props.globals.getNode("/autopilot/locks/altitude", 1);
8: if ( node.getValue() == "altitude-hold" ) {
9: node.setValue( "" );
10: } else {
11: node.setValue( "altitude-hold" );
12: }
13: </script>
14: </binding>
15: </key>
1. index
2. name of key in format of '[Modifier-]<key>' (e.g. Ctrl-A, a, G, ESC) - Key name is case sensitive
3. description
4-14. command that is bound to a key - DO NOT EDIT
Modifiers
There are two modifiers described in xml file.
- <mod-up>
mod-up describes a command when a key is released. - <mod-shift>
mod-shift describes a command when a shift is pressed
February 5th, 2007 at 5:06 pm Does anyone want to post a copy of their key bindings file? I'm looking for a Powerbook key set up, but I'm sure others would like some mac-configured presets as well.
February 5th, 2007 at 8:34 pm Hi Guy, Great! Somebody does want that. Why don' you send me the file. I'll post it here.