Generate wxEVT_TEXT_ENTER for Enter key on Numpad too in wxMSW

Handle WXK_NUMPAD_ENTER in the same way as we already handle WXK_RETURN.

Closes #18504.
This commit is contained in:
Vadim Zeitlin
2019-09-15 14:31:42 +02:00
parent dfc6cdc063
commit 0146c47a7f
2 changed files with 2 additions and 0 deletions

View File

@@ -2075,6 +2075,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
switch ( event.GetKeyCode() )
{
case WXK_RETURN:
case WXK_NUMPAD_ENTER:
// Single line controls only get this key code if they have
// wxTE_PROCESS_ENTER style, but multiline ones always get it
// because they need it for themselves. However we shouldn't

View File

@@ -580,6 +580,7 @@ private:
switch ( event.GetKeyCode() )
{
case WXK_RETURN:
case WXK_NUMPAD_ENTER:
if ( m_win->HasFlag(wxTE_PROCESS_ENTER) )
specialKey = true;
break;