Re: #15777: Validator disables the mnemonic letter of dialog buttons in wxGTK

15 views
Skip to first unread message

wxTrac

unread,
May 9, 2021, 10:34:51 PM5/9/21
to wx-...@googlegroups.com
#15777: Validator disables the mnemonic letter of dialog buttons in wxGTK
-----------------------------+-----------------------------
Reporter: jbbbms | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxGTK | Version: 3.0.0
Resolution: port to stable | Keywords: wxTextValidator
Blocked By: | Blocking:
Patch: 0 |
-----------------------------+-----------------------------
Changes (by AliKet):

* cc: aliket1435@… (added)


Comment:

Unless i am missing something obvious here, a slightly modified version of
yours:

{{{
if (!m_validatorWindow)
return;

// Don't process the accelerators, i.e. any keys with any modifiers
except
// for Shift and AltGr.
if ( event.GetModifiers() & ~wxMOD_SHIFT )
{
if ( !(event.ControlDown() && event.AltDown()) )
return;
}

#if wxUSE_UNICODE
// We only filter normal, printable characters.
int keyCode = event.GetUnicodeKey();
}}}

is a reasonable fix for this bug IMO ?

for both `wxTextValidator::OnChar()` and `wxNumValidatorBase::OnChar()`

tested and working for me.

Regards,
AliKet

--
Ticket URL: <https://trac.wxwidgets.org/ticket/15777#comment:8>

wxTrac

unread,
Jun 10, 2021, 6:48:05 PM6/10/21
to wx-...@googlegroups.com
#15777: Validator disables the mnemonic letter of dialog buttons in wxGTK
-----------------------------+-----------------------------
Reporter: jbbbms | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxGTK | Version: 3.0.0
Resolution: port to stable | Keywords: wxTextValidator
Blocked By: | Blocking:
Patch: 0 |
-----------------------------+-----------------------------

Comment (by vadz):

We should add a method to `wxKeyboardState` checking if it's a "normal"
key or not and use it in both places. If you could please make a PR doing
this, it would be welcome, TIA!

--
Ticket URL: <https://trac.wxwidgets.org/ticket/15777#comment:9>
Reply all
Reply to author
Forward
0 new messages