]> git.saurik.com Git - wxWidgets.git/commitdiff
On the Mac the Alt key is a character modifier like Shift, so let char
authorRobin Dunn <robin@alldunn.com>
Tue, 28 Sep 2004 00:13:53 +0000 (00:13 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 28 Sep 2004 00:13:53 +0000 (00:13 +0000)
events with AltDown proceed into Scintilla.

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

contrib/src/stc/stc.cpp
contrib/src/stc/stc.cpp.in
src/stc/stc.cpp
src/stc/stc.cpp.in

index c57c858a9509fc99c7328e0bde2ba82fdf67bbaf..57ba993f8f47f8e570387233bb4ce5b77dce8ece 100644 (file)
@@ -2727,7 +2727,14 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
     // to let the char through in that case, otherwise if only ctrl or only
     // alt let's skip it.
     bool ctrl = evt.ControlDown();
+#ifdef __WXMAC__
+    // On the Mac the Alt key is just a modifier key (like Shift) so we need
+    // to allow the char events to be processed when Alt is pressed.
+    // TODO:  Should we check MetaDown instead in this case?
+    bool alt = false;
+#else
     bool alt  = evt.AltDown();
+#endif
     bool skip = ((ctrl || alt) && ! (ctrl && alt));
 
     int key = evt.GetKeyCode();
index 7ed874510f3a49a9db3fc0c876dfa3293e0f0d4e..c753a6e315acd530c04339eafd8670c18989e698 100644 (file)
@@ -501,7 +501,14 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
     // to let the char through in that case, otherwise if only ctrl or only
     // alt let's skip it.
     bool ctrl = evt.ControlDown();
+#ifdef __WXMAC__
+    // On the Mac the Alt key is just a modifier key (like Shift) so we need
+    // to allow the char events to be processed when Alt is pressed.
+    // TODO:  Should we check MetaDown instead in this case?
+    bool alt = false;
+#else
     bool alt  = evt.AltDown();
+#endif
     bool skip = ((ctrl || alt) && ! (ctrl && alt));
 
     int key = evt.GetKeyCode();
index c57c858a9509fc99c7328e0bde2ba82fdf67bbaf..57ba993f8f47f8e570387233bb4ce5b77dce8ece 100644 (file)
@@ -2727,7 +2727,14 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
     // to let the char through in that case, otherwise if only ctrl or only
     // alt let's skip it.
     bool ctrl = evt.ControlDown();
+#ifdef __WXMAC__
+    // On the Mac the Alt key is just a modifier key (like Shift) so we need
+    // to allow the char events to be processed when Alt is pressed.
+    // TODO:  Should we check MetaDown instead in this case?
+    bool alt = false;
+#else
     bool alt  = evt.AltDown();
+#endif
     bool skip = ((ctrl || alt) && ! (ctrl && alt));
 
     int key = evt.GetKeyCode();
index 7ed874510f3a49a9db3fc0c876dfa3293e0f0d4e..c753a6e315acd530c04339eafd8670c18989e698 100644 (file)
@@ -501,7 +501,14 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
     // to let the char through in that case, otherwise if only ctrl or only
     // alt let's skip it.
     bool ctrl = evt.ControlDown();
+#ifdef __WXMAC__
+    // On the Mac the Alt key is just a modifier key (like Shift) so we need
+    // to allow the char events to be processed when Alt is pressed.
+    // TODO:  Should we check MetaDown instead in this case?
+    bool alt = false;
+#else
     bool alt  = evt.AltDown();
+#endif
     bool skip = ((ctrl || alt) && ! (ctrl && alt));
 
     int key = evt.GetKeyCode();