From: Stefan Csomor <csomor@advancedconcepts.ch>
Date: Tue, 23 Aug 2011 13:19:19 +0000 (+0000)
Subject: adjusting keyboardstate to new ctrl / raw_ctrl handling on osx
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dd9ec5961f0ad1594d48205b3902130f3a5c85a3

adjusting keyboardstate to new ctrl / raw_ctrl handling on osx

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

diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp
index 722f9cc2f8..161ab55387 100644
--- a/src/osx/carbon/app.cpp
+++ b/src/osx/carbon/app.cpp
@@ -1570,10 +1570,10 @@ wxMouseState wxGetMouseState()
     ms.SetRightDown( (buttons & 0x02) != 0 );
 
     UInt32 modifiers = GetCurrentKeyModifiers();
-    ms.SetControlDown(modifiers & controlKey);
+    ms.SetRawControlDown(modifiers & controlKey);
     ms.SetShiftDown(modifiers & shiftKey);
     ms.SetAltDown(modifiers & optionKey);
-    ms.SetMetaDown(modifiers & cmdKey);
+    ms.SetControlDown(modifiers & cmdKey);
 
     return ms;
 }
@@ -1766,9 +1766,9 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess
     }
 
     event.m_shiftDown = modifiers & shiftKey;
-    event.m_controlDown = modifiers & controlKey;
+    event.m_rawControlDown = modifiers & controlKey;
     event.m_altDown = modifiers & optionKey;
-    event.m_metaDown = modifiers & cmdKey;
+    event.m_controlDown = modifiers & cmdKey;
     event.m_keyCode = keyval ;
 #if wxUSE_UNICODE
     event.m_uniChar = uniChar ;
diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm
index 225c9d487c..7307a6837a 100644
--- a/src/osx/cocoa/utils.mm
+++ b/src/osx/cocoa/utils.mm
@@ -305,10 +305,10 @@ wxMouseState wxGetMouseState()
     ms.SetMiddleDown( (buttons & 0x04) != 0 );
     ms.SetRightDown( (buttons & 0x02) != 0 );
     
-    ms.SetControlDown(modifiers & NSControlKeyMask);
+    ms.SetRealControlDown(modifiers & NSControlKeyMask);
     ms.SetShiftDown(modifiers & NSShiftKeyMask);
     ms.SetAltDown(modifiers & NSAlternateKeyMask);
-    ms.SetMetaDown(modifiers & NSCommandKeyMask);
+    ms.SetControlDown(modifiers & NSCommandKeyMask);
     
     return ms;
 }
diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm
index ec4381d4c0..931885b6fa 100644
--- a/src/osx/cocoa/window.mm
+++ b/src/osx/cocoa/window.mm
@@ -298,9 +298,9 @@ void wxWidgetCocoaImpl::SetupKeyEvent(wxKeyEvent &wxevent , NSEvent * nsEvent, N
     int eventType = [nsEvent type];
 
     wxevent.m_shiftDown = modifiers & NSShiftKeyMask;
-    wxevent.m_controlDown = modifiers & NSControlKeyMask;
+    wxevent.m_rawControlDown = modifiers & NSControlKeyMask;
     wxevent.m_altDown = modifiers & NSAlternateKeyMask;
-    wxevent.m_metaDown = modifiers & NSCommandKeyMask;
+    wxevent.m_controlDown = modifiers & NSCommandKeyMask;
 
     wxevent.m_rawCode = [nsEvent keyCode];
     wxevent.m_rawFlags = modifiers;
@@ -427,9 +427,9 @@ void wxWidgetCocoaImpl::SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEve
     wxevent.m_x = locationInViewWX.x;
     wxevent.m_y = locationInViewWX.y;
     wxevent.m_shiftDown = modifiers & NSShiftKeyMask;
-    wxevent.m_controlDown = modifiers & NSControlKeyMask;
+    wxevent.m_rawControlDown = modifiers & NSControlKeyMask;
     wxevent.m_altDown = modifiers & NSAlternateKeyMask;
-    wxevent.m_metaDown = modifiers & NSCommandKeyMask;
+    wxevent.m_controlDown = modifiers & NSCommandKeyMask;
     wxevent.SetTimestamp( (int)([nsEvent timestamp] * 1000) ) ;
 
     UInt32 mouseChord = 0;