wxX11 could not get UnicodeKey yet, not wxUniversal. And use AND instead OR. otherwise the check not work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-23 17:43:09 +00:00
parent 813c7a15c1
commit 17c3ad1914

View File

@@ -1413,9 +1413,9 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
GetId());
cmdEvent1.SetEventObject(this);
cmdEvent1.SetFlags(flags);
#if wxUSE_UNICODE || !__WXUNIVERSAL__
#if wxUSE_UNICODE || !__WXX11__
cmdEvent1.SetCharacter(event.GetUnicodeKey());
#elif !wxUSE_UNICODE || __WXUNIVERSAL__
#elif !wxUSE_UNICODE || __WXX11__
cmdEvent1.SetCharacter((wxChar) keycode);
#endif
cmdEvent1.SetPosition(m_caretPosition+1);
@@ -1430,9 +1430,9 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
GetId());
cmdEvent.SetEventObject(this);
cmdEvent.SetFlags(flags);
#if wxUSE_UNICODE || !__WXUNIVERSAL__
#if wxUSE_UNICODE && !__WXX11__
cmdEvent.SetCharacter(event.GetUnicodeKey());
#elif !wxUSE_UNICODE || __WXUNIVERSAL__
#elif !wxUSE_UNICODE || __WXX11__
cmdEvent.SetCharacter((wxChar) keycode);
#endif
cmdEvent.SetPosition(m_caretPosition+1);
@@ -1473,9 +1473,9 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
long newPos = m_caretPosition;
DeleteSelectedContent(& newPos);
#if wxUSE_UNICODE || !__WXUNIVERSAL__
#if wxUSE_UNICODE && !__WXX11__
wxString str = event.GetUnicodeKey();
#elif !wxUSE_UNICODE || __WXUNIVERSAL__
#elif !wxUSE_UNICODE || __WXX11__
wxString str = (wxChar) event.GetKeyCode();
#endif
GetFocusObject()->InsertTextWithUndo(& GetBuffer(), newPos+1, str, this, 0);