Settingsscreen.h — added isInWifiNetworkSelect() (returns true while EDIT_WIFI + WIFI_PHASE_SELECT), sitting next to isInWifiPasswordEntry().

main.cpp — added a dispatch block in the Settings handler: when the network picker is showing and key=='\b' with shift consumed, it calls ui_task.injectKey('q'), which runs the existing 'q' exit path synchronously (tear-down of EDIT_WIFI, onboarding handling, wifiReconnectSaved()) and refreshes. So Shift+Del and Q now both exit the picker, with no duplicated exit logic.
This commit is contained in:
pelgraine
2026-06-17 07:02:21 +10:00
parent 7a61f3efe2
commit 6aa12f27b5
2 changed files with 14 additions and 0 deletions
+8
View File
@@ -4764,6 +4764,14 @@ void handleKeyboardInput() {
}
#endif
// Shift+Backspace on the WiFi network picker: exit (same as Q)
#ifdef MECK_WIFI_COMPANION
if (settings->isInWifiNetworkSelect() && key == '\b' && keyboard.wasShiftConsumed()) {
ui_task.injectKey('q');
return;
}
#endif
// All other keys -> settings screen via injectKey
ui_task.injectKey(key);
@@ -869,6 +869,12 @@ public:
}
void wifiPasswordBack() { _wifiPhase = WIFI_PHASE_SELECT; }
// True while the WiFi network picker is showing; UITask uses this so
// Shift+Backspace can exit the picker (same as Q).
bool isInWifiNetworkSelect() const {
return _editMode == EDIT_WIFI && _wifiPhase == WIFI_PHASE_SELECT;
}
#if defined(LilyGo_T5S3_EPaper_Pro)
// T5S3 VKB integration — UITask polls this to open the virtual keyboard
// when settings enters WiFi password phase (no physical keyboard available).