diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index acf694db..14c44b46 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -1495,7 +1495,11 @@ static void lastHeardToggleContact() { if (horizontal) { return (dx < 0) ? (char)KEY_NEXT : (char)KEY_PREV; } - return (char)KEY_NEXT; // vertical swipe = next (default) + // Shutdown page: vertical swipe toggles hibernate/power off + if (ui_task.isHomeOnShutdownPage()) { + return 'w'; // toggle (direction doesn't matter) + } + return (char)KEY_NEXT; // vertical swipe = next page (default) } // Settings: horizontal swipe → a/d for picker/number editing diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 6d3e46c5..3490fe34 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -1115,7 +1115,9 @@ public: return true; // eat all other keys while confirming } // Up/down toggles between hibernate and power off - if (c == KEY_NEXT || c == 's' || c == KEY_PREV || c == 'w') { + // Only 'w'/'s' (keyboard) — KEY_NEXT/KEY_PREV fall through to page cycling + // so touch swipes and taps can still navigate away from this page. + if (c == 'w' || c == 's') { _poweroff_selected = !_poweroff_selected; return true; } @@ -1131,11 +1133,11 @@ public: // Left/right fall through to page cycling below } - if (c == KEY_LEFT || c == KEY_PREV) { + if (c == KEY_LEFT || c == KEY_PREV || c == 'a') { _page = (_page + HomePage::Count - 1) % HomePage::Count; return true; } - if (c == KEY_NEXT || c == KEY_RIGHT) { + if (c == KEY_NEXT || c == KEY_RIGHT || c == 'd') { _page = (_page + 1) % HomePage::Count; if (_page == HomePage::RECENT) { _task->showAlert("Recent adverts", 800);