chart2/source/controller/main/ObjectHierarchy.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit c94d9233d61a8dbf7d4ac35b1a6038554e801810
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Jan 29 10:33:32 2026 +0000
Commit:     Miklos Vajna <[email protected]>
CommitDate: Tue Feb 3 08:52:27 2026 +0100

    Allow Enter/ESC to navigate levels in chart hierarchy
    
    Change-Id: I9baa2512ac97ca9376591254c64852e280d1a11c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198499
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx 
b/chart2/source/controller/main/ObjectHierarchy.cxx
index e5603394b5af..ea6a8ff5fb19 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -597,9 +597,17 @@ bool ObjectKeyNavigation::handleKeyEvent(
             else
                 bResult = down();
             break;
+        // allow 'Enter' to go down a level
+        case awt::Key::RETURN:
+            bResult = down();
+            break;
         case awt::Key::ESCAPE:
-            setCurrentSelection( ObjectIdentifier() );
-            bResult = true;
+            bResult = up(); // allow 'Esc' to go up a level if inside a 
sublevel
+            if (!bResult)
+            {
+                setCurrentSelection( ObjectIdentifier() );
+                bResult = true;
+            }
             break;
         default:
             bResult = false;

Reply via email to