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:
@@ -2075,6 +2075,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
|
|||||||
switch ( event.GetKeyCode() )
|
switch ( event.GetKeyCode() )
|
||||||
{
|
{
|
||||||
case WXK_RETURN:
|
case WXK_RETURN:
|
||||||
|
case WXK_NUMPAD_ENTER:
|
||||||
// Single line controls only get this key code if they have
|
// Single line controls only get this key code if they have
|
||||||
// wxTE_PROCESS_ENTER style, but multiline ones always get it
|
// wxTE_PROCESS_ENTER style, but multiline ones always get it
|
||||||
// because they need it for themselves. However we shouldn't
|
// because they need it for themselves. However we shouldn't
|
||||||
|
@@ -580,6 +580,7 @@ private:
|
|||||||
switch ( event.GetKeyCode() )
|
switch ( event.GetKeyCode() )
|
||||||
{
|
{
|
||||||
case WXK_RETURN:
|
case WXK_RETURN:
|
||||||
|
case WXK_NUMPAD_ENTER:
|
||||||
if ( m_win->HasFlag(wxTE_PROCESS_ENTER) )
|
if ( m_win->HasFlag(wxTE_PROCESS_ENTER) )
|
||||||
specialKey = true;
|
specialKey = true;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user