]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for non-US keyboards: the ASCII chars must be unsigned
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 8 Apr 2002 13:35:05 +0000 (13:35 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 8 Apr 2002 13:35:05 +0000 (13:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index a148d6e60d545a9cbec92739d51420a7376d286a..0628df2a0427f5fb8dbc5cab0702bf7df2342df1 100644 (file)
@@ -1156,12 +1156,12 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
         {
             if ( gdk_event->length == 1 )
             {
         {
             if ( gdk_event->length == 1 )
             {
-                key_code = gdk_event->string[0];
+                key_code = (unsigned char)gdk_event->string[0];
             }
             }
-            else if ((keysym & 0xFF) == keysym)
+            else if ( wxIsAsciiKeysym(keysym) )
             {
                 // ASCII key
             {
                 // ASCII key
-                key_code = (guint)keysym;
+                key_code = (unsigned char)keysym;
             }
         }
 
             }
         }
 
index a148d6e60d545a9cbec92739d51420a7376d286a..0628df2a0427f5fb8dbc5cab0702bf7df2342df1 100644 (file)
@@ -1156,12 +1156,12 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
         {
             if ( gdk_event->length == 1 )
             {
         {
             if ( gdk_event->length == 1 )
             {
-                key_code = gdk_event->string[0];
+                key_code = (unsigned char)gdk_event->string[0];
             }
             }
-            else if ((keysym & 0xFF) == keysym)
+            else if ( wxIsAsciiKeysym(keysym) )
             {
                 // ASCII key
             {
                 // ASCII key
-                key_code = (guint)keysym;
+                key_code = (unsigned char)keysym;
             }
         }
 
             }
         }