Fix special keys on Windows

This commit is contained in:
Chris Pavlina 2016-01-15 21:07:06 -05:00 committed by Chris Pavlina
parent f574620d07
commit 95988802f7
1 changed files with 16 additions and 0 deletions

View File

@ -166,6 +166,22 @@ public:
else else
{ {
m_event = aEvent; m_event = aEvent;
// EVT_CHAR_HOOK returns some incorrect keys (shift+symbol,
// in particular). If the key is an ASCII printable, grab the
// code from GetUnicodeKey instead.
// TODO: Make the whole hotkey system support Unicode keys.
if( aEvent.GetKeyCode() >= '!' && aEvent.GetKeyCode() <= '~' )
{
if( aEvent.GetEventType() == wxEVT_CHAR_HOOK )
{
aEvent.DoAllowNextEvent();
return;
}
}
EndFlexible( wxID_OK ); EndFlexible( wxID_OK );
} }
} }