]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed KeySym handling ((keysym & 0xF000) != 0 instead of keysym < 0xFF to determine...
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 19 Mar 2000 15:28:45 +0000 (15:28 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 19 Mar 2000 15:28:45 +0000 (15:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/window.cpp

index 2519cd6f39f72ad498427ab03dc168e988ef2f8d..11ac0f1d55c8c43cbbff779407839c4fa1050283 100644 (file)
@@ -503,7 +503,7 @@ static long map_to_unmodified_wx_keysym( KeySym keysym )
         case GDK_F12:           key_code = WXK_F12;         break;
         default:
         {
-            if (keysym <= 0xFF)
+            if ((keysym & 0xF000) == 0)
             {
                 guint upper = gdk_keyval_to_upper( (guint)keysym );
                 keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
@@ -602,7 +602,7 @@ static long map_to_wx_keysym( KeySym keysym )
         case GDK_F12:           key_code = WXK_F12;         break;
         default:
         {
-            if (keysym <= 0xFF)
+            if ((keysym & 0xF000) == 0)
             {
                 key_code = (guint)keysym;
             }
@@ -794,6 +794,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
     if (!win->m_hasVMT) return FALSE;
     if (g_blockEventsOnDrag) return FALSE;
 
+
 /*
     wxString tmp;
     tmp += (char)gdk_event->keyval;
index 2519cd6f39f72ad498427ab03dc168e988ef2f8d..11ac0f1d55c8c43cbbff779407839c4fa1050283 100644 (file)
@@ -503,7 +503,7 @@ static long map_to_unmodified_wx_keysym( KeySym keysym )
         case GDK_F12:           key_code = WXK_F12;         break;
         default:
         {
-            if (keysym <= 0xFF)
+            if ((keysym & 0xF000) == 0)
             {
                 guint upper = gdk_keyval_to_upper( (guint)keysym );
                 keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
@@ -602,7 +602,7 @@ static long map_to_wx_keysym( KeySym keysym )
         case GDK_F12:           key_code = WXK_F12;         break;
         default:
         {
-            if (keysym <= 0xFF)
+            if ((keysym & 0xF000) == 0)
             {
                 key_code = (guint)keysym;
             }
@@ -794,6 +794,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
     if (!win->m_hasVMT) return FALSE;
     if (g_blockEventsOnDrag) return FALSE;
 
+
 /*
     wxString tmp;
     tmp += (char)gdk_event->keyval;