From 9d78e32da8afe2d1aa8268f075ddecc87facc8cf Mon Sep 17 00:00:00 2001
From: curt <curt>
Date: Sat, 29 May 1999 13:03:26 +0000
Subject: [PATCH] Fix bug with passing PUI keystrokes on to glut.

---
 Simulator/Main/GLUTkey.cxx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Simulator/Main/GLUTkey.cxx b/Simulator/Main/GLUTkey.cxx
index 05b309ed0..afda34583 100644
--- a/Simulator/Main/GLUTkey.cxx
+++ b/Simulator/Main/GLUTkey.cxx
@@ -83,7 +83,9 @@ void GLUTkey(unsigned char k, int x, int y) {
     w = &current_weather;
 
     FG_LOG( FG_INPUT, FG_DEBUG, "Key hit = " << k );
-    puKeyboard(k, PU_DOWN );
+    if ( puKeyboard(k, PU_DOWN) ) {
+	return;
+    }
 
     if ( GLUT_ACTIVE_ALT && glutGetModifiers() ) {
 	FG_LOG( FG_INPUT, FG_DEBUG, " SHIFTED" );
@@ -306,7 +308,10 @@ void GLUTspecialkey(int k, int x, int y) {
     v = &current_view;
 
     FG_LOG( FG_INPUT, FG_DEBUG, "Special key hit = " << k );
-    puKeyboard(k + PU_KEY_GLUT_SPECIAL_OFFSET, PU_DOWN);
+
+    if ( puKeyboard(k + PU_KEY_GLUT_SPECIAL_OFFSET, PU_DOWN) ) {
+	return;
+    }
 
     if ( GLUT_ACTIVE_SHIFT && glutGetModifiers() ) {
 	FG_LOG( FG_INPUT, FG_DEBUG, " SHIFTED" );