diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 93b28ecb70..286057886c 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -3264,6 +3264,14 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) const int pageSize = GetCountPerPage(); wxCHECK_RET( pageSize, _T("should have non zero page size") ); + if (GetLayoutDirection() == wxLayout_RightToLeft) + { + if (event.GetKeyCode() == WXK_RIGHT) + event.m_keyCode = WXK_LEFT; + else if (event.GetKeyCode() == WXK_LEFT) + event.m_keyCode = WXK_RIGHT; + } + switch ( event.GetKeyCode() ) { case WXK_UP: diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 00ba1e08ee..8bff91ca89 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -2585,6 +2585,14 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event ) event.CmdDown(), is_multiple, extended_select, unselect_others); + if (GetLayoutDirection() == wxLayout_RightToLeft) + { + if (event.GetKeyCode() == WXK_RIGHT) + event.m_keyCode = WXK_LEFT; + else if (event.GetKeyCode() == WXK_LEFT) + event.m_keyCode = WXK_RIGHT; + } + // + : Expand // - : Collaspe // * : Expand all/Collapse all