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
This commit is contained in:
Václav Slavík 2000-03-19 15:28:45 +00:00
parent 9c6751aa46
commit 3d6f72618e
2 changed files with 6 additions and 4 deletions

View 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;

View 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;