]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing type for key event, using WXK_RAW_CONTROL constant for controlkey, see #13415
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 23 Aug 2011 15:30:44 +0000 (15:30 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 23 Aug 2011 15:30:44 +0000 (15:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/window.mm

index c26fe0dfaf83c5d34ae2c2c941f3baeb1b2a1e2b..ce90d2f800b84960145d752fcc1479709599a800 100644 (file)
@@ -214,7 +214,7 @@ long wxOSXTranslateCocoaKey( NSEvent* event, int eventType )
         // command key
         case 54:
         case 55:
-            retval = WXK_COMMAND;
+            retval = WXK_CONTROL;
             break;
         // caps locks key
         case 57: // Capslock
@@ -233,7 +233,7 @@ long wxOSXTranslateCocoaKey( NSEvent* event, int eventType )
         // ctrl key
         case 59: // Left Ctrl
         case 62: // Right Ctrl
-            retval = WXK_CONTROL;
+            retval = WXK_RAW_CONTROL;
             break;
         // clear key
         case 71:
@@ -2141,6 +2141,7 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
             {
                 // eventually we could setup a doCommandBySelector catcher and retransform this into the wx key chars
                 wxKeyEvent wxevent2(wxevent) ;
+                wxevent2.SetEventType(wxEVT_CHAR);
                 wxevent2.m_keyCode = keycode;
                 result = GetWXPeer()->OSXHandleKeyEvent(wxevent2);
             }