From: Stefan Csomor Date: Tue, 23 Aug 2011 15:30:44 +0000 (+0000) Subject: fixing type for key event, using WXK_RAW_CONTROL constant for controlkey, see #13415 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/68065b91941e8af835aea308d8dfbc7df7468c1e fixing type for key event, using WXK_RAW_CONTROL constant for controlkey, see #13415 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index c26fe0dfaf..ce90d2f800 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -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); }