mirror of
https://github.com/pelgraine/Meck.git
synced 2026-08-12 03:32:44 +02:00
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:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user