From b6df8fd1340ac8210e9ae2e45280707b9fdace85 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Wed, 4 Mar 2026 21:51:37 +0000 Subject: [PATCH 1/8] Initial plan From 6ce03db09f6d080ed5ed7306feabf3e8b3a6757c Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Wed, 4 Mar 2026 21:58:07 +0000 Subject: [PATCH 2/8] Add Ctrl+Tab keyboard navigation for device information tabs Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com> --- src/gui/gsc_info_window.cpp | 32 ++++++++++++++++++++++++++++++++ src/gui/gsc_info_window.h | 4 ++++ 2 files changed, 36 insertions(+) diff --git a/src/gui/gsc_info_window.cpp b/src/gui/gsc_info_window.cpp index ae32000..c08db28 100644 --- a/src/gui/gsc_info_window.cpp +++ b/src/gui/gsc_info_window.cpp @@ -805,6 +805,38 @@ bool GscInfoWindow::on_delete_event([[maybe_unused]] GdkEventAny* e) +bool GscInfoWindow::on_key_press_event(GdkEventKey* event) +{ + // Handle Ctrl+Tab and Ctrl+Shift+Tab for tab navigation + if ((event->state & GDK_CONTROL_MASK) && event->keyval == GDK_KEY_Tab) { + auto* notebook = lookup_widget("main_notebook"); + if (notebook) { + const int n_pages = notebook->get_n_pages(); + if (n_pages > 1) { + int current_page = notebook->get_current_page(); + int next_page; + + // Check if Shift is also pressed for backward navigation + if (event->state & GDK_SHIFT_MASK) { + // Ctrl+Shift+Tab: go to previous tab + next_page = (current_page - 1 + n_pages) % n_pages; + } else { + // Ctrl+Tab: go to next tab + next_page = (current_page + 1) % n_pages; + } + + notebook->set_current_page(next_page); + return true; // event handled + } + } + } + + // Call base class handler for other keys + return Gtk::Window::on_key_press_event(event); +} + + + void GscInfoWindow::on_refresh_info_button_clicked() { this->refresh_info(); diff --git a/src/gui/gsc_info_window.h b/src/gui/gsc_info_window.h index 862142a..d1a8516 100644 --- a/src/gui/gsc_info_window.h +++ b/src/gui/gsc_info_window.h @@ -217,6 +217,10 @@ class GscInfoWindow : public AppBuilderWidget { /// Reimplemented from Gtk::Window. bool on_delete_event(GdkEventAny* e) override; + /// Handle key press events for keyboard navigation. + /// Reimplemented from Gtk::Window. + bool on_key_press_event(GdkEventKey* event) override; + // ---------- Other callbacks From 9427d829a3f638173064e0a381eee07cdc1b0821 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Fri, 6 Mar 2026 14:44:39 +0000 Subject: [PATCH 3/8] Support Ctrl+Tab navigation for Advanced tab sub-tabs Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com> --- src/gui/gsc_info_window.cpp | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/src/gui/gsc_info_window.cpp b/src/gui/gsc_info_window.cpp index c08db28..c26824e 100644 --- a/src/gui/gsc_info_window.cpp +++ b/src/gui/gsc_info_window.cpp @@ -809,11 +809,34 @@ bool GscInfoWindow::on_key_press_event(GdkEventKey* event) { // Handle Ctrl+Tab and Ctrl+Shift+Tab for tab navigation if ((event->state & GDK_CONTROL_MASK) && event->keyval == GDK_KEY_Tab) { - auto* notebook = lookup_widget("main_notebook"); - if (notebook) { - const int n_pages = notebook->get_n_pages(); + auto* main_notebook = lookup_widget("main_notebook"); + if (main_notebook) { + // Check if we're on the Advanced tab with sub-tabs + auto* advanced_notebook = lookup_widget("advanced_notebook"); + if (advanced_notebook && advanced_notebook->get_visible()) { + const int n_pages = advanced_notebook->get_n_pages(); + if (n_pages > 1) { + int current_page = advanced_notebook->get_current_page(); + int next_page; + + // Check if Shift is also pressed for backward navigation + if (event->state & GDK_SHIFT_MASK) { + // Ctrl+Shift+Tab: go to previous sub-tab + next_page = (current_page - 1 + n_pages) % n_pages; + } else { + // Ctrl+Tab: go to next sub-tab + next_page = (current_page + 1) % n_pages; + } + + advanced_notebook->set_current_page(next_page); + return true; // event handled + } + } + + // Otherwise, cycle through main notebook tabs + const int n_pages = main_notebook->get_n_pages(); if (n_pages > 1) { - int current_page = notebook->get_current_page(); + int current_page = main_notebook->get_current_page(); int next_page; // Check if Shift is also pressed for backward navigation @@ -825,7 +848,7 @@ bool GscInfoWindow::on_key_press_event(GdkEventKey* event) next_page = (current_page + 1) % n_pages; } - notebook->set_current_page(next_page); + main_notebook->set_current_page(next_page); return true; // event handled } } From 3373750d2cb250a8d958b1511eab2c55824c7ed5 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Sat, 7 Mar 2026 16:18:01 +0100 Subject: [PATCH 4/8] Update src/gui/gsc_info_window.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/gui/gsc_info_window.cpp | 47 +++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/src/gui/gsc_info_window.cpp b/src/gui/gsc_info_window.cpp index c26824e..06fd6c0 100644 --- a/src/gui/gsc_info_window.cpp +++ b/src/gui/gsc_info_window.cpp @@ -815,21 +815,42 @@ bool GscInfoWindow::on_key_press_event(GdkEventKey* event) auto* advanced_notebook = lookup_widget("advanced_notebook"); if (advanced_notebook && advanced_notebook->get_visible()) { const int n_pages = advanced_notebook->get_n_pages(); - if (n_pages > 1) { - int current_page = advanced_notebook->get_current_page(); - int next_page; - - // Check if Shift is also pressed for backward navigation - if (event->state & GDK_SHIFT_MASK) { - // Ctrl+Shift+Tab: go to previous sub-tab - next_page = (current_page - 1 + n_pages) % n_pages; - } else { - // Ctrl+Tab: go to next sub-tab - next_page = (current_page + 1) % n_pages; + + // Count how many sub-tabs are actually visible + int visible_pages = 0; + for (int i = 0; i < n_pages; ++i) { + if (auto* page = advanced_notebook->get_nth_page(i)) { + if (page->get_visible()) + ++visible_pages; } + } - advanced_notebook->set_current_page(next_page); - return true; // event handled + // Only enable cycling when more than one sub-tab is visible + if (visible_pages > 1) { + const int current_page = advanced_notebook->get_current_page(); + + // Helper to find the next visible page in the given direction + const auto find_next_visible_page = [&](int start_index, int step) -> int { + int index = start_index; + for (int i = 0; i < n_pages; ++i) { + index = (index + step + n_pages) % n_pages; + if (auto* page = advanced_notebook->get_nth_page(index)) { + if (page->get_visible()) + return index; + } + } + // Fallback: no other visible page found; stay on current + return start_index; + }; + + const bool backward = (event->state & GDK_SHIFT_MASK) != 0; + const int step = backward ? -1 : 1; + const int next_page = find_next_visible_page(current_page, step); + + if (next_page != current_page) { + advanced_notebook->set_current_page(next_page); + return true; // event handled + } } } From b167098a6da6dd1bc8b2f29d860097c2249befb2 Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Sat, 7 Mar 2026 16:18:36 +0100 Subject: [PATCH 5/8] Update src/gui/gsc_info_window.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/gui/gsc_info_window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/gsc_info_window.cpp b/src/gui/gsc_info_window.cpp index 06fd6c0..b335a72 100644 --- a/src/gui/gsc_info_window.cpp +++ b/src/gui/gsc_info_window.cpp @@ -808,7 +808,8 @@ bool GscInfoWindow::on_delete_event([[maybe_unused]] GdkEventAny* e) bool GscInfoWindow::on_key_press_event(GdkEventKey* event) { // Handle Ctrl+Tab and Ctrl+Shift+Tab for tab navigation - if ((event->state & GDK_CONTROL_MASK) && event->keyval == GDK_KEY_Tab) { + if ( (event->state & GDK_CONTROL_MASK) + && (event->keyval == GDK_KEY_Tab || event->keyval == GDK_KEY_ISO_Left_Tab)) { auto* main_notebook = lookup_widget("main_notebook"); if (main_notebook) { // Check if we're on the Advanced tab with sub-tabs From dcce1f12508b56ca527397e9d03c94eab748f9ee Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Sat, 7 Mar 2026 16:18:50 +0100 Subject: [PATCH 6/8] Update src/gui/gsc_info_window.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/gui/gsc_info_window.cpp | 90 +++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 34 deletions(-) diff --git a/src/gui/gsc_info_window.cpp b/src/gui/gsc_info_window.cpp index b335a72..bb0ecf4 100644 --- a/src/gui/gsc_info_window.cpp +++ b/src/gui/gsc_info_window.cpp @@ -831,46 +831,68 @@ bool GscInfoWindow::on_key_press_event(GdkEventKey* event) const int current_page = advanced_notebook->get_current_page(); // Helper to find the next visible page in the given direction - const auto find_next_visible_page = [&](int start_index, int step) -> int { - int index = start_index; - for (int i = 0; i < n_pages; ++i) { - index = (index + step + n_pages) % n_pages; - if (auto* page = advanced_notebook->get_nth_page(index)) { - if (page->get_visible()) - return index; - } - } - // Fallback: no other visible page found; stay on current - return start_index; - }; - - const bool backward = (event->state & GDK_SHIFT_MASK) != 0; - const int step = backward ? -1 : 1; - const int next_page = find_next_visible_page(current_page, step); - - if (next_page != current_page) { - advanced_notebook->set_current_page(next_page); - return true; // event handled + // Helper to cycle only across visible notebook pages + auto cycle_visible_pages = [&](Gtk::Notebook* notebook) -> bool { + if (!notebook) { + return false; + } + + const int n_pages = notebook->get_n_pages(); + std::vector visible_pages; + visible_pages.reserve(n_pages); + + for (int i = 0; i < n_pages; ++i) { + if (auto* page = notebook->get_nth_page(i)) { + if (page->get_visible()) { + visible_pages.push_back(i); } } } - // Otherwise, cycle through main notebook tabs - const int n_pages = main_notebook->get_n_pages(); - if (n_pages > 1) { - int current_page = main_notebook->get_current_page(); - int next_page; - - // Check if Shift is also pressed for backward navigation - if (event->state & GDK_SHIFT_MASK) { - // Ctrl+Shift+Tab: go to previous tab - next_page = (current_page - 1 + n_pages) % n_pages; - } else { - // Ctrl+Tab: go to next tab - next_page = (current_page + 1) % n_pages; + // Need at least two visible pages to make cycling meaningful + if (visible_pages.size() <= 1) { + return false; + } + + const int current_page = notebook->get_current_page(); + int visible_index = 0; + + auto it = std::find(visible_pages.begin(), visible_pages.end(), current_page); + if (it != visible_pages.end()) { + visible_index = static_cast(std::distance(visible_pages.begin(), it)); + } + + int next_visible_index = 0; + + // Check if Shift is also pressed for backward navigation + if (event->state & GDK_SHIFT_MASK) { + // Ctrl+Shift+Tab: go to previous visible tab + next_visible_index = + (visible_index - 1 + static_cast(visible_pages.size())) % + static_cast(visible_pages.size()); + } else { + // Ctrl+Tab: go to next visible tab + next_visible_index = + (visible_index + 1) % + static_cast(visible_pages.size()); + } + + notebook->set_current_page(visible_pages[next_visible_index]); + return true; + }; + + auto* main_notebook = lookup_widget("main_notebook"); + if (main_notebook) { + // Check if we're on the Advanced tab with sub-tabs + auto* advanced_notebook = lookup_widget("advanced_notebook"); + if (advanced_notebook && advanced_notebook->get_visible()) { + if (cycle_visible_pages(advanced_notebook)) { + return true; // event handled } + } - main_notebook->set_current_page(next_page); + // Otherwise, cycle through main notebook tabs + if (cycle_visible_pages(main_notebook)) { return true; // event handled } } From 980d0f143c16efb8e6513750c1610b05d992060a Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Sat, 7 Mar 2026 15:41:03 +0000 Subject: [PATCH 7/8] Fix build issues: clean up corrupted function and properly structure code Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com> --- src/gui/gsc_info_window.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/gui/gsc_info_window.cpp b/src/gui/gsc_info_window.cpp index bb0ecf4..24e3c4b 100644 --- a/src/gui/gsc_info_window.cpp +++ b/src/gui/gsc_info_window.cpp @@ -810,27 +810,7 @@ bool GscInfoWindow::on_key_press_event(GdkEventKey* event) // Handle Ctrl+Tab and Ctrl+Shift+Tab for tab navigation if ( (event->state & GDK_CONTROL_MASK) && (event->keyval == GDK_KEY_Tab || event->keyval == GDK_KEY_ISO_Left_Tab)) { - auto* main_notebook = lookup_widget("main_notebook"); - if (main_notebook) { - // Check if we're on the Advanced tab with sub-tabs - auto* advanced_notebook = lookup_widget("advanced_notebook"); - if (advanced_notebook && advanced_notebook->get_visible()) { - const int n_pages = advanced_notebook->get_n_pages(); - - // Count how many sub-tabs are actually visible - int visible_pages = 0; - for (int i = 0; i < n_pages; ++i) { - if (auto* page = advanced_notebook->get_nth_page(i)) { - if (page->get_visible()) - ++visible_pages; - } - } - - // Only enable cycling when more than one sub-tab is visible - if (visible_pages > 1) { - const int current_page = advanced_notebook->get_current_page(); - // Helper to find the next visible page in the given direction // Helper to cycle only across visible notebook pages auto cycle_visible_pages = [&](Gtk::Notebook* notebook) -> bool { if (!notebook) { From b7cfa45cac26034a98e6db579e61ff4cd30bfd44 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Sat, 7 Mar 2026 16:47:13 +0000 Subject: [PATCH 8/8] Fix Advanced tab detection: only cycle sub-tabs when Advanced is active Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com> --- src/gui/gsc_info_window.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/gui/gsc_info_window.cpp b/src/gui/gsc_info_window.cpp index 24e3c4b..bd7413d 100644 --- a/src/gui/gsc_info_window.cpp +++ b/src/gui/gsc_info_window.cpp @@ -864,10 +864,19 @@ bool GscInfoWindow::on_key_press_event(GdkEventKey* event) auto* main_notebook = lookup_widget("main_notebook"); if (main_notebook) { // Check if we're on the Advanced tab with sub-tabs + auto* advanced_tab_vbox = lookup_widget("advanced_tab_vbox"); auto* advanced_notebook = lookup_widget("advanced_notebook"); - if (advanced_notebook && advanced_notebook->get_visible()) { - if (cycle_visible_pages(advanced_notebook)) { - return true; // event handled + + // Only handle sub-tab cycling if the Advanced tab is currently active + if (advanced_tab_vbox && advanced_notebook && advanced_notebook->get_visible()) { + const int advanced_page_num = main_notebook->page_num(*advanced_tab_vbox); + const int current_main_page = main_notebook->get_current_page(); + + // Advanced tab is active, so cycle through its sub-tabs + if (advanced_page_num >= 0 && advanced_page_num == current_main_page) { + if (cycle_visible_pages(advanced_notebook)) { + return true; // event handled + } } }