Browse Source

Fix special keys on Windows

pull/10/head
Chris Pavlina 10 years ago
committed by Chris Pavlina
parent
commit
95988802f7
  1. 16
      common/widgets/widget_hotkey_list.cpp

16
common/widgets/widget_hotkey_list.cpp

@ -166,6 +166,22 @@ public:
else
{
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 );
}
}

Loading…
Cancel
Save