Applied patch to correct EVT-CHAR
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1203,15 +1203,16 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
|||||||
key_code = wxTranslateKeySymToWXKey(keysym, TRUE /* isChar */);
|
key_code = wxTranslateKeySymToWXKey(keysym, TRUE /* isChar */);
|
||||||
if ( !key_code )
|
if ( !key_code )
|
||||||
{
|
{
|
||||||
if ( gdk_event->length == 1 )
|
if ( wxIsAsciiKeysym(keysym) )
|
||||||
{
|
|
||||||
key_code = (unsigned char)gdk_event->string[0];
|
|
||||||
}
|
|
||||||
else if ( wxIsAsciiKeysym(keysym) )
|
|
||||||
{
|
{
|
||||||
// ASCII key
|
// ASCII key
|
||||||
key_code = (unsigned char)keysym;
|
key_code = (unsigned char)keysym;
|
||||||
}
|
}
|
||||||
|
// gdk_event->string is actually deprecated
|
||||||
|
else if ( gdk_event->length == 1 )
|
||||||
|
{
|
||||||
|
key_code = (unsigned char)gdk_event->string[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( key_code )
|
if ( key_code )
|
||||||
|
@@ -1203,15 +1203,16 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
|
|||||||
key_code = wxTranslateKeySymToWXKey(keysym, TRUE /* isChar */);
|
key_code = wxTranslateKeySymToWXKey(keysym, TRUE /* isChar */);
|
||||||
if ( !key_code )
|
if ( !key_code )
|
||||||
{
|
{
|
||||||
if ( gdk_event->length == 1 )
|
if ( wxIsAsciiKeysym(keysym) )
|
||||||
{
|
|
||||||
key_code = (unsigned char)gdk_event->string[0];
|
|
||||||
}
|
|
||||||
else if ( wxIsAsciiKeysym(keysym) )
|
|
||||||
{
|
{
|
||||||
// ASCII key
|
// ASCII key
|
||||||
key_code = (unsigned char)keysym;
|
key_code = (unsigned char)keysym;
|
||||||
}
|
}
|
||||||
|
// gdk_event->string is actually deprecated
|
||||||
|
else if ( gdk_event->length == 1 )
|
||||||
|
{
|
||||||
|
key_code = (unsigned char)gdk_event->string[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( key_code )
|
if ( key_code )
|
||||||
|
Reference in New Issue
Block a user