From 332f349e07d70e9c1cf32ca0021802ef08646908 Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Sat, 11 Jul 2020 18:52:41 -0400 Subject: [PATCH] LibGUI: Fix keybind conflicts in TreeView Changes the shortcut to expand and collapse subtrees from alt to ctrl+right/left arrows in TreeView. The current shortcuts conflict with applications that already have navigation controls bound to alt like file manager. --- Libraries/LibGUI/TreeView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibGUI/TreeView.cpp b/Libraries/LibGUI/TreeView.cpp index 76b5022f04c..8411332c731 100644 --- a/Libraries/LibGUI/TreeView.cpp +++ b/Libraries/LibGUI/TreeView.cpp @@ -469,7 +469,7 @@ void TreeView::keydown_event(KeyEvent& event) if (event.key() == KeyCode::Key_Left) { if (cursor_index.is_valid() && model()->row_count(cursor_index)) { - if (event.alt()) { + if (event.ctrl()) { collapse_tree(cursor_index); return; } @@ -489,7 +489,7 @@ void TreeView::keydown_event(KeyEvent& event) if (event.key() == KeyCode::Key_Right) { if (cursor_index.is_valid() && model()->row_count(cursor_index)) { - if (event.alt()) { + if (event.ctrl()) { expand_tree(cursor_index); return; }