]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/FGKeyboardInput.cxx
Prepare and implement reinit methods for instruments
[flightgear.git] / src / Input / FGKeyboardInput.cxx
index 49426d27afa429250b917a4d1d05b138cf760fe3..3f5bdfcb2cfacb12b66094b545ab3e404b8bbf11 100644 (file)
@@ -71,7 +71,16 @@ static bool getModHyper ()
 FGKeyboardInput * FGKeyboardInput::keyboardInput = NULL;
 
 FGKeyboardInput::FGKeyboardInput() :
-    _key_event(fgGetNode("/devices/status/keyboard/event", true))
+    _key_event(fgGetNode("/devices/status/keyboard/event", true)),
+    _key_code(0),
+    _key_modifiers(0),
+    _key_pressed(0),
+    _key_shift(0),
+    _key_ctrl(0),
+    _key_alt(0),
+    _key_meta(0),
+    _key_super(0),
+    _key_hyper(0)
 {
   if( keyboardInput == NULL )
     keyboardInput = this;
@@ -124,7 +133,7 @@ void FGKeyboardInput::postinit()
 
 void FGKeyboardInput::bind()
 {
-  _tiedProperties.setRoot(fgGetNode("/device/status", true));
+  _tiedProperties.setRoot(fgGetNode("/devices/status", true));
   _tiedProperties.Tie("keyboard",       getModifiers);
   _tiedProperties.Tie("keyboard/shift", getModShift);
   _tiedProperties.Tie("keyboard/ctrl",  getModCtrl);