From 27290ab0efc6d8413b829f2046c87fedd91b74cb Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 5 Apr 2004 18:54:53 +0000 Subject: [PATCH 1/1] Restore the hard-coded HUD keybindings that I inadvertently killed during deglutification. --- src/Input/input.cxx | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 744135836..757a6148e 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -217,9 +217,6 @@ FGInput::makeDefault (bool status) void FGInput::doKey (int k, int modifiers, int x, int y) { - // static SGPropertyNode *heading_enabled - // = fgGetNode("/autopilot/locks/heading", true); - // Sanity check. if (k < 0 || k >= MAX_KEYS) { SG_LOG(SG_INPUT, SG_WARN, "Key value " << k << " out of range"); @@ -259,10 +256,29 @@ FGInput::doKey (int k, int modifiers, int x, int y) } } } - - // Use the old, default actions. SG_LOG( SG_INPUT, SG_DEBUG, "(No user binding.)" ); + + if (modifiers & KEYMOD_RELEASED) + return; + + // Hard-coded legacy key handlers. + // These need to be turned into FGCommand bindings and mapped via + // the input configuration... + switch (k) { + case 'H': + HUD_brightkey( true ); + break; + case 'h': + HUD_masterswitch( true ); + break; + case 'I': + fgHUDInit2(¤t_aircraft); // Minimal Hud + break; + case 'i': + fgHUDInit(¤t_aircraft); // normal HUD + break; + } } void -- 2.39.2