gtk/window: generate WXK_NONE key event for unknown keys
There are still plenty of X11 keys which have no WXK mapping and might be useful for applications to act upon. Instead of trying to remap all of them, generate a WXK_NONE key event and let applications deal with it using GetRawKeyCode() if appropriate.
This commit is contained in:
parent
9cc0c9a082
commit
33553ed141
@ -1080,12 +1080,12 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
|
||||
event.m_uniChar = event.m_keyCode;
|
||||
}
|
||||
|
||||
// sending unknown key events doesn't really make sense
|
||||
// sending a WXK_NONE key and let app deal with it the RawKeyCode if required
|
||||
if ( !key_code && !event.m_uniChar )
|
||||
return false;
|
||||
event.m_keyCode = WXK_NONE;
|
||||
#else
|
||||
if (!key_code)
|
||||
return false;
|
||||
event.m_keyCode = WXK_NONE;
|
||||
#endif // wxUSE_UNICODE
|
||||
|
||||
// now fill all the other fields
|
||||
|
Loading…
Reference in New Issue
Block a user