]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/cmdproc.cpp
In wxPopupFocusHandler, watch for EVT_CHAR, not EVT_KEY_DOWN.
[wxWidgets.git] / src / common / cmdproc.cpp
index 5ece41e787903d813d3b2e79ef8a6563301285ca..789e950f95abd09ef8ded525709314174572f54d 100644 (file)
@@ -28,6 +28,7 @@
     #include "wx/intl.h"
     #include "wx/string.h"
     #include "wx/menu.h"
+    #include "wx/accel.h"
 #endif //WX_PRECOMP
 
 #include "wx/cmdproc.h"
@@ -59,8 +60,11 @@ wxCommandProcessor::wxCommandProcessor(int maxCommands)
 #if wxUSE_MENUS
     m_commandEditMenu = NULL;
 #endif // wxUSE_MENUS
-    m_undoAccelerator = wxT("\tCtrl+Z");
-    m_redoAccelerator = wxT("\tCtrl+Y");
+
+#if wxUSE_ACCEL
+    m_undoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Z').ToString();
+    m_redoAccelerator = '\t' + wxAcceleratorEntry(wxACCEL_CTRL, 'Y').ToString();
+#endif // wxUSE_ACCEL
 
     m_lastSavedCommand =
     m_currentCommand = wxList::compatibility_iterator();