From 3d6f72618e96307cb5de739fe8a19df152d84e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 19 Mar 2000 15:28:45 +0000 Subject: [PATCH] fixed KeySym handling ((keysym & 0xF000) != 0 instead of keysym < 0xFF to determine printable characters git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/window.cpp | 5 +++-- src/gtk1/window.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 2519cd6f39..11ac0f1d55 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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; diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 2519cd6f39..11ac0f1d55 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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;