diff --git a/docs/changes.txt b/docs/changes.txt index cbcc6b5012..fe91400fc3 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -15,6 +15,10 @@ All (GUI): - Add wxHtmlWindow::SetDefaultHTMLCursor() (Jeff A. Marr). - Add default ctor and Create() to wxContextHelpButton (Hanmac). +wxGTK: + +- Don't intercept accelerators in wxTextValidator. + wxMSW: - Make wxFILTER_INCLUDE_LIST in wxTextValidator actually usable. diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 70bf904009..717902d269 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -308,6 +308,11 @@ void wxTextValidator::OnChar(wxKeyEvent& event) if (!m_validatorWindow) return; + // Don't process the accelerators, i.e. any keys with any modifiers except + // for Shift. + if ( event.GetModifiers() & ~wxMOD_SHIFT ) + return; + #if wxUSE_UNICODE // We only filter normal, printable characters. int keyCode = event.GetUnicodeKey();