Patch #3310 2012-07-19 22:31

alpha0010

Fix use of numpad enter
Download
3310-Fix_use_of_num.patch (2.3 KB)
Category
Application::Bugfix
Status
Accepted
Close date
2012-08-08 05:07
Assigned to
mortenmacfly
Index: src/sdk/incrementalselectlistdlg.cpp
===================================================================
--- src/sdk/incrementalselectlistdlg.cpp    (revision 8148)
+++ src/sdk/incrementalselectlistdlg.cpp    (working copy)
@@ -31,6 +31,7 @@
     switch (event.GetKeyCode())
     {
         case WXK_RETURN:
+        case WXK_NUMPAD_ENTER:
             m_pParent->EndModal(wxID_OK);
             break;
 
Index: src/sdk/cbstyledtextctrl.cpp
===================================================================
--- src/sdk/cbstyledtextctrl.cpp    (revision 8148)
+++ src/sdk/cbstyledtextctrl.cpp    (working copy)
@@ -183,6 +183,7 @@
         break;
 
         case WXK_RETURN:
+        case WXK_NUMPAD_ENTER:
         case WXK_ESCAPE:
         {
             if (m_tabSmartJump)
Index: src/sdk/cbtreectrl.cpp
===================================================================
--- src/sdk/cbtreectrl.cpp    (revision 8148)
+++ src/sdk/cbtreectrl.cpp    (working copy)
@@ -104,6 +104,7 @@
     switch (keycode)
     {
         case WXK_RETURN:
+        case WXK_NUMPAD_ENTER:
         {
             wxTreeEvent te = wxTreeEvent(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, this, itemId);
             wxPostEvent(this, te);
Index: src/src/switcherdlg.cpp
===================================================================
--- src/src/switcherdlg.cpp    (revision 8148)
+++ src/src/switcherdlg.cpp    (working copy)
@@ -583,7 +583,7 @@
         return;
     }
 
-    if (event.GetKeyCode() == WXK_ESCAPE || event.GetKeyCode() == WXK_RETURN)
+    if (event.GetKeyCode() == WXK_ESCAPE || event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER)
     {
         // The window will close, don't select the item under mouse pointer
         m_ptMouse.x = m_ptMouse.y = -2;
Index: src/src/associations.cpp
===================================================================
--- src/src/associations.cpp    (revision 8148)
+++ src/src/associations.cpp    (working copy)
@@ -392,7 +392,7 @@
 {
     if ( event.GetKeyCode() == WXK_ESCAPE )
         Close(); //wxDialog::Close() send button event with id wxID_CANCEL (wxWidgets 2.8)
-    else if ( event.GetKeyCode() == WXK_RETURN )
+    else if ( (event.GetKeyCode() == WXK_RETURN) || (event.GetKeyCode() == WXK_NUMPAD_ENTER) )
         EndModal(XRCCTRL(*this, "choice", wxRadioBox)->GetSelection());
 
     event.Skip();