In the native OS X tree control right cursor arrow expands the current item
and the left one collapses it if it's expanded, make the generic control work
like this too under Mac.
Closes #12019.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64227
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// end : go to last item without opening parents
// alnum : start or continue searching for the item with this prefix
int keyCode = event.GetKeyCode();
+
+#ifdef __WXOSX__
+ // Make the keys work as they do in the native control:
+ // right => expand
+ // left => collapse if current item is expanded
+ if (keyCode == WXK_RIGHT)
+ {
+ keyCode = '+';
+ }
+ else if (keyCode == WXK_LEFT && IsExpanded(m_current))
+ {
+ keyCode = '-';
+ }
+#endif // __WXOSX__
+
switch ( keyCode )
{
case '+':