From 3e3166af39f09b986ccc6b0f6ea11661810100f0 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Mon, 8 Sep 2003 21:26:19 +0000
Subject: fixed lock mask for num and scroll lock

---
 src/FbTk/TextBox.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc
index 817c4f6..01451e4 100644
--- a/src/FbTk/TextBox.cc
+++ b/src/FbTk/TextBox.cc
@@ -19,12 +19,13 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: TextBox.cc,v 1.1 2003/08/26 23:24:48 fluxgen Exp $
+// $Id: TextBox.cc,v 1.2 2003/09/08 21:26:19 fluxgen Exp $
 
 #include "TextBox.hh"
 #include "Font.hh"
 #include "EventManager.hh"
 #include "App.hh"
+#include "KeyUtil.hh"
 
 #include <cctype>
 #include <X11/keysym.h>
@@ -183,6 +184,10 @@ void TextBox::buttonPressEvent(XButtonEvent &event) {
 }
 
 void TextBox::keyPressEvent(XKeyEvent &event) {
+    // strip numlock and scrolllock mask
+    event.state &= ~FbTk::KeyUtil::numlockMod();
+    event.state &= ~FbTk::KeyUtil::scrolllockMod();
+
     KeySym ks;
     char keychar[1];
     XLookupString(&event, keychar, 1, &ks, 0);
-- 
cgit v0.11.2