On the Mac the Alt key is a character modifier like Shift, so let char

events with AltDown proceed into Scintilla.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-09-28 00:13:53 +00:00
parent 1553abf415
commit 28e0c28ee3
4 changed files with 28 additions and 0 deletions

View File

@@ -2727,7 +2727,14 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
// to let the char through in that case, otherwise if only ctrl or only // to let the char through in that case, otherwise if only ctrl or only
// alt let's skip it. // alt let's skip it.
bool ctrl = evt.ControlDown(); 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(); bool alt = evt.AltDown();
#endif
bool skip = ((ctrl || alt) && ! (ctrl && alt)); bool skip = ((ctrl || alt) && ! (ctrl && alt));
int key = evt.GetKeyCode(); int key = evt.GetKeyCode();

View File

@@ -501,7 +501,14 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
// to let the char through in that case, otherwise if only ctrl or only // to let the char through in that case, otherwise if only ctrl or only
// alt let's skip it. // alt let's skip it.
bool ctrl = evt.ControlDown(); 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(); bool alt = evt.AltDown();
#endif
bool skip = ((ctrl || alt) && ! (ctrl && alt)); bool skip = ((ctrl || alt) && ! (ctrl && alt));
int key = evt.GetKeyCode(); int key = evt.GetKeyCode();

View File

@@ -2727,7 +2727,14 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
// to let the char through in that case, otherwise if only ctrl or only // to let the char through in that case, otherwise if only ctrl or only
// alt let's skip it. // alt let's skip it.
bool ctrl = evt.ControlDown(); 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(); bool alt = evt.AltDown();
#endif
bool skip = ((ctrl || alt) && ! (ctrl && alt)); bool skip = ((ctrl || alt) && ! (ctrl && alt));
int key = evt.GetKeyCode(); int key = evt.GetKeyCode();

View File

@@ -501,7 +501,14 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
// to let the char through in that case, otherwise if only ctrl or only // to let the char through in that case, otherwise if only ctrl or only
// alt let's skip it. // alt let's skip it.
bool ctrl = evt.ControlDown(); 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(); bool alt = evt.AltDown();
#endif
bool skip = ((ctrl || alt) && ! (ctrl && alt)); bool skip = ((ctrl || alt) && ! (ctrl && alt));
int key = evt.GetKeyCode(); int key = evt.GetKeyCode();