]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed wxMSW's EVT_CHAR so it conforms to the docs and also what wxGTK
authorRobin Dunn <robin@alldunn.com>
Wed, 14 Aug 2002 21:22:43 +0000 (21:22 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 14 Aug 2002 21:22:43 +0000 (21:22 +0000)
does already.  IOW, Ctrl-C should result in keycode == 3, not 99.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 36162cb9a9be5fc03a20a1f3b8468ebb750efb90..9dbcec6d34929eb668c45474fbebc1ba2c403fcb 100644 (file)
@@ -4303,7 +4303,9 @@ bool wxWindowMSW::HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII)
     int id;
     if ( isASCII )
     {
-        // If 1 -> 26, translate to CTRL plus a letter.
+        // If 1 -> 26, translate to either special keycode or just set
+        // ctrlDown.  IOW, Ctrl-C should result in keycode == 3 and
+        // ControlDown() == TRUE.
         id = wParam;
         if ( (id > 0) && (id < 27) )
         {
@@ -4323,7 +4325,7 @@ bool wxWindowMSW::HandleChar(WXWPARAM wParam, WXLPARAM lParam, bool isASCII)
 
                 default:
                     ctrlDown = TRUE;
-                    id = id + 'a' - 1;
+                    break;
             }
         }
     }