It was mistakenly set to the same value as in EVT_KEY_DOWN event but, just as
m_keyCode, it may be different for EVT_CHAR.
Use gdk_keyval_to_unicode() to set it correctly instead of inheriting
EVT_KEY_DOWN value.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72267
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// will only be sent if it is not in an accelerator table.
if (!ret)
{
- long key_code;
KeySym keysym = gdk_event->keyval;
// Find key code for EVT_CHAR and EVT_CHAR_HOOK events
- key_code = wxTranslateKeySymToWXKey(keysym, true /* isChar */);
+ long key_code = wxTranslateKeySymToWXKey(keysym, true /* isChar */);
if ( !key_code )
{
if ( wxIsAsciiKeysym(keysym) )
wxLogTrace(TRACE_KEYS, wxT("Char event: %ld"), key_code);
eventChar.m_keyCode = key_code;
+#if wxUSE_UNICODE
+ eventChar.m_uniChar = gdk_keyval_to_unicode(key_code);
+#endif // wxUSE_UNICODE
AdjustCharEventKeyCodes(eventChar);