]> git.mxchange.org Git - flightgear.git/commit
I'm attaching diffs to add a new FGInput module to FlightGear
authorcurt <curt>
Wed, 23 May 2001 23:01:15 +0000 (23:01 +0000)
committercurt <curt>
Wed, 23 May 2001 23:01:15 +0000 (23:01 +0000)
commit94f745e3ea7282696b7384b3b7519a561b187589
tree660eb013bff8a37ea3d203ea1e1edea391abd677
parent7208b95d36b1db89829187225bd1ae832794af1f
I'm attaching diffs to add a new FGInput module to FlightGear
(src/Input).  So far, FGInput replaces most of src/Main/keyboard.cxx
(I've left a tiny stub); in the very near future, it will also take
over control of the joystick, mouse (Norm permitting), and panel
instrument interactions, so that there is a single mechanism for
configuring all input devices.

The new format should be (close to) self-explanatory by looking at the
new base-package file keyboard.xml, which is now included by
preferences.xml (I'll do the same thing for the joystick when I have a
chance).  I have not managed to move all keybindings into this file
yet, but I've made a good start.  I'm including Tony in the recipient
list so that he can see how bindings can use an external XML file.

This patch also adds support for multiple bindings for a single key,
special keys (i.e. keypad and function keys), and key modifiers
(shift/alt/ctrl); special keys use the PUI convention of adding 256 to
the Glut key code.

Unfortunately, everything comes with a price; in this case, I have not
yet found a general mechanism for the old (hard-coded) modal bindings,
which behaved differently depending on the autopilot state (i.e. left
rudder or move AP heading left); with my patches, this functionality
disappears, but you can still adjust the autopilot using the panel or
the GUI input dialogs.
src/Main/Makefile.am
src/Main/fg_init.cxx
src/Main/fg_props.cxx
src/Main/fg_props.hxx
src/Main/keyboard.cxx
src/Makefile.am