]> git.saurik.com Git - wxWidgets.git/commitdiff
No longer emit char events for shift/ctrl presses.
authorRobert Roebling <robert@roebling.de>
Tue, 18 May 1999 15:30:56 +0000 (15:30 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 18 May 1999 15:30:56 +0000 (15:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index a66604c1d79e934e0cdbabb559b83b73c0311d33..8bf4d36bfa6d3ba151fd90a54f79baa0f24020ab 100644 (file)
@@ -295,10 +295,6 @@ static long map_to_wx_keysym( KeySym keysym )
 
     switch (keysym)
     {
-        case GDK_Shift_L:
-        case GDK_Shift_R:       key_code = WXK_SHIFT;       break;
-        case GDK_Control_L:
-        case GDK_Control_R:     key_code = WXK_CONTROL;     break;
         case GDK_Menu:          key_code = WXK_MENU;        break;
         case GDK_Help:          key_code = WXK_HELP;        break;
         case GDK_BackSpace:     key_code = WXK_BACK;        break;
@@ -592,7 +588,8 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
     key_code = map_to_wx_keysym( gdk_event->keyval );
 
     /* wxMSW doesn't send char events with Alt pressed */
-    if (((gdk_event->state & GDK_MOD1_MASK) == 0) &&
+    if ((key_code != 0) &&
+        ((gdk_event->state & GDK_MOD1_MASK) == 0) &&
         ((gdk_event->state & GDK_MOD1_MASK) == 0))
     {
         wxKeyEvent event2( wxEVT_CHAR );                 
index a66604c1d79e934e0cdbabb559b83b73c0311d33..8bf4d36bfa6d3ba151fd90a54f79baa0f24020ab 100644 (file)
@@ -295,10 +295,6 @@ static long map_to_wx_keysym( KeySym keysym )
 
     switch (keysym)
     {
-        case GDK_Shift_L:
-        case GDK_Shift_R:       key_code = WXK_SHIFT;       break;
-        case GDK_Control_L:
-        case GDK_Control_R:     key_code = WXK_CONTROL;     break;
         case GDK_Menu:          key_code = WXK_MENU;        break;
         case GDK_Help:          key_code = WXK_HELP;        break;
         case GDK_BackSpace:     key_code = WXK_BACK;        break;
@@ -592,7 +588,8 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
     key_code = map_to_wx_keysym( gdk_event->keyval );
 
     /* wxMSW doesn't send char events with Alt pressed */
-    if (((gdk_event->state & GDK_MOD1_MASK) == 0) &&
+    if ((key_code != 0) &&
+        ((gdk_event->state & GDK_MOD1_MASK) == 0) &&
         ((gdk_event->state & GDK_MOD1_MASK) == 0))
     {
         wxKeyEvent event2( wxEVT_CHAR );