[ wxwindows-Patches-1539213 ] wxStyledTextCtrl: numpad navigation

SourceForge.net noreply at sourceforge.net
Sun Apr 1 08:21:47 PDT 2007


Patches item #1539213, was opened at 2006-08-12 17:23
Message generated for change (Comment added) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1539213&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Contrib -- STC
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Private: No
Submitted By: troelsk (troelsk)
Assigned to: Robin Dunn (robind)
Summary: wxStyledTextCtrl: numpad navigation

Initial Comment:
Adding these lines to 
contrib/src/stc/ScintillaWX.cpp/ScintillaWX::DoKeyDown
enables numpad navigation:

case WXK_NUMPAD_DOWN:       key = SCK_DOWN;     break;
case WXK_NUMPAD_UP:         key = SCK_UP;       break;
case WXK_NUMPAD_LEFT:       key = SCK_LEFT;     break;
case WXK_NUMPAD_RIGHT:      key = SCK_RIGHT;    break;


----------------------------------------------------------------------

>Comment By: Vadim Zeitlin (vadz)
Date: 2007-04-01 17:21

Message:
Logged In: YES 
user_id=71618
Originator: NO

This seems to have been already fixed in the cvs.

----------------------------------------------------------------------

Comment By: Wade Brainerd (wadebrainerd)
Date: 2006-11-14 02:17

Message:
Logged In: YES 
user_id=735038

Here's an actual patch.  Delete is also included.

---
/cygdrive/c/wxWidgets-2.6.3-original/contrib/src/stc/ScintillaWX.cpp
2006-03-12 20:58:26.000000000 -0500
+++
/cygdrive/c/wxWidgets-2.6.3/contrib/src/stc/ScintillaWX.cpp
2006-11-13 20:04:12.698875000 -0500
@@ -901,16 +901,23 @@
         key += 'A' - 1;
 
     switch (key) {
+    case WXK_NUMPAD_DOWN:       // fall through
     case WXK_DOWN:              key = SCK_DOWN;     break;
+    case WXK_NUMPAD_UP:         // fall through
     case WXK_UP:                key = SCK_UP;       break;
+    case WXK_NUMPAD_LEFT:       // fall through
     case WXK_LEFT:              key = SCK_LEFT;     break;
+    case WXK_NUMPAD_RIGHT:      // fall through
     case WXK_RIGHT:             key = SCK_RIGHT;    break;
+    case WXK_NUMPAD_HOME:       // fall through
     case WXK_HOME:              key = SCK_HOME;     break;
+    case WXK_NUMPAD_END:        // fall through
     case WXK_END:               key = SCK_END;      break;
     case WXK_PAGEUP:            // fall through
     case WXK_PRIOR:             key = SCK_PRIOR;    break;
     case WXK_PAGEDOWN:          // fall through
     case WXK_NEXT:              key = SCK_NEXT;     break;
+    case WXK_NUMPAD_DELETE:     // fall through
     case WXK_DELETE:            key = SCK_DELETE;   break;
     case WXK_INSERT:            key = SCK_INSERT;   break;
     case WXK_ESCAPE:            key = SCK_ESCAPE;   break;


----------------------------------------------------------------------

Comment By: Wade Brainerd (wadebrainerd)
Date: 2006-10-26 13:29

Message:
Logged In: YES 
user_id=735038

FWIW, the numpad 'delete' key is also broken in the same way.

Best regards,
Wade

----------------------------------------------------------------------

Comment By: troelsk (troelsk)
Date: 2006-08-12 17:43

Message:
Logged In: YES 
user_id=1290727

case WXK_NUMPAD_DOWN:       key = SCK_DOWN;     break;
case WXK_NUMPAD_UP:         key = SCK_UP;       break;
case WXK_NUMPAD_LEFT:       key = SCK_LEFT;     break;
case WXK_NUMPAD_RIGHT:      key = SCK_RIGHT;    break;
case WXK_NUMPAD_HOME:       key = SCK_HOME;     break;
case WXK_NUMPAD_END:        key = SCK_END;      break;
case WXK_NUMPAD_PRIOR:      key = SCK_PRIOR;    break;
case WXK_NUMPAD_NEXT:       key = SCK_NEXT;     break;


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1539213&group_id=9863




More information about the wx-dev mailing list