No longer emit char events for shift/ctrl presses.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
891ad68ff5
commit
04f90a8ce6
@ -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 );
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user