fix for non-US keyboards: the ASCII chars must be unsigned

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-04-08 13:35:05 +00:00
parent 1c6896d711
commit 486ac2444d
2 changed files with 6 additions and 6 deletions

View File

@ -1156,12 +1156,12 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
{
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
key_code = (guint)keysym;
key_code = (unsigned char)keysym;
}
}

View File

@ -1156,12 +1156,12 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
{
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
key_code = (guint)keysym;
key_code = (unsigned char)keysym;
}
}