don't set Alt/Ctrl modifiers for the AltGr char events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4378,9 +4378,18 @@ bool wxWindowMSW::HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII)
|
||||
}
|
||||
|
||||
wxKeyEvent event(CreateKeyEvent(wxEVT_CHAR, id, lParam, wParam));
|
||||
if ( ctrlDown )
|
||||
|
||||
// the alphanumeric keys produced by pressing AltGr+something on European
|
||||
// keyboards have both Ctrl and Alt modifiers which may confuse the user
|
||||
// code as, normally, keys with Ctrl and/or Alt don't result in anything
|
||||
// alphanumeric, so pretend that there are no modifiers at all (the
|
||||
// KEY_DOWN event would still have the correct modifiers if they're really
|
||||
// needed)
|
||||
if ( event.m_controlDown && event.m_altDown &&
|
||||
(id >= 32 && id < 256) )
|
||||
{
|
||||
event.m_controlDown = TRUE;
|
||||
event.m_controlDown =
|
||||
event.m_altDown = FALSE;
|
||||
}
|
||||
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
|
Reference in New Issue
Block a user