diff --git a/src/osx/textctrl_osx.cpp b/src/osx/textctrl_osx.cpp index 118bf388c3..98f5950844 100644 --- a/src/osx/textctrl_osx.cpp +++ b/src/osx/textctrl_osx.cpp @@ -342,7 +342,7 @@ void wxTextCtrl::OnDropFiles(wxDropFilesEvent& event) void wxTextCtrl::OnKeyDown(wxKeyEvent& event) { - if ( event.GetModifiers() == wxMOD_CONTROL ) + if ( event.ControlDown() ) { switch( event.GetKeyCode() ) { @@ -361,6 +361,18 @@ void wxTextCtrl::OnKeyDown(wxKeyEvent& event) if ( CanCut() ) Cut() ; return; + case 'Z': + if ( !event.ShiftDown() ) + { + if ( CanUndo() ) + Undo() ; + return; + } + // else fall through to Redo + case 'Y': + if ( CanRedo() ) + Redo() ; + return; default: break; }