diff --git a/mythtv/libs/libmythui/mythuibuttontree.cpp b/mythtv/libs/libmythui/mythuibuttontree.cpp index 1dd99d64dc5..d80833a38ba 100644 --- a/mythtv/libs/libmythui/mythuibuttontree.cpp +++ b/mythtv/libs/libmythui/mythuibuttontree.cpp @@ -533,17 +533,32 @@ bool MythUIButtonTree::keyPressEvent(QKeyEvent *event) { QString action = actions[i]; handled = true; - - if (action == "RIGHT") + if (m_activeList && m_activeList->m_layout == MythUIButtonList::LayoutGrid) { - SwitchList(true); + if (action == "SELECT" && m_currentNode->childCount() > 0) + { + SwitchList(true); + } + else if (action == "ESCAPE" && m_currentDepth > 1) + { + SwitchList(false); + } + else + handled = false; } - else if (action == "LEFT") + else { - SwitchList(false); + if (action == "RIGHT") + { + SwitchList(true); + } + else if (action == "LEFT") + { + SwitchList(false); + } + else + handled = false; } - else - handled = false; } if (!handled && m_activeList)