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:
parent
1c6896d711
commit
486ac2444d
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user