Step 197: keyboard navigation audit

This commit is contained in:
Bill
2026-02-10 05:08:02 -07:00
parent 09fd7b011e
commit eb49e2a3a7
12 changed files with 183 additions and 2 deletions

View File

@@ -932,6 +932,38 @@ struct EditorState {
}
}
bool hasSidePanels() const {
if (ui.showOutline) return true;
if (library.showDependencyPanel) return true;
if (library.showLibraryBrowserPanel) return true;
if (library.showCompositionPanel) return true;
if (emacsState.showEmacsPackagesPanel) return true;
if (emacsState.showEmacsBridgePanel) return true;
return true; // Memory Strategies panel is always present.
}
void cyclePanelFocus() {
FocusRegion order[] = {
FocusRegion::Editor,
FocusRegion::Explorer,
FocusRegion::Side,
FocusRegion::Bottom
};
int current = 0;
for (int i = 0; i < 4; ++i) {
if (ui.focusedRegion == order[i]) {
current = i;
break;
}
}
for (int step = 1; step <= 4; ++step) {
FocusRegion next = order[(current + step) % 4];
if (next == FocusRegion::Side && !hasSidePanels()) continue;
ui.focusTarget = next;
return;
}
}
void applySettingsToState() {
ui.showMinimap = settings.getShowMinimap();
ui.showLineNumbers = settings.getShowLineNumbers();