Fix patch browser keyboard navigation to cover directory rows

Arrow keys now navigate the full virtual row list (../, subdirs, patches)
rather than only patch rows. Landing on a patch auto-loads it as before;
landing on .. or a subdir highlights it and Enter confirms navigation.
Added patchVCursor to UIState to track keyboard focus independently of
the loaded patch. Mouse-click on a patch now also syncs the cursor so
subsequent arrow-key movement starts from the right position.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Anachronaut
2026-07-07 22:32:46 -04:00
parent ff59c7c66a
commit e40645f280
4 changed files with 71 additions and 96 deletions

View File

@@ -72,6 +72,7 @@ typedef struct {
char patchCurrentDir[256];
char patchSubDirs[PATCH_MAX_DIRS][PATCH_NAME_LEN];
int patchSubDirCount;
int patchVCursor;
// Control registry — built lazily by uiKnob/uiSlider for CC mapping persistence
UIControlEntry controlRegistry[128];