diff --git a/src/audio_settings_page.cpp b/src/audio_settings_page.cpp index 7ef23cc..244ad34 100644 --- a/src/audio_settings_page.cpp +++ b/src/audio_settings_page.cpp @@ -116,12 +116,6 @@ void AudioSettingsPage::onPush(AppState& state) { } }); - state.keybinds.bind(SDLK_TAB, "audio_tab", [this]() { - if (modalState_ == ModalState::None) { - state_->pages.pop(*state_); - } - }); - refreshDeviceAndTrackLists(); } @@ -201,12 +195,6 @@ void AudioSettingsPage::onResume(AppState& state) { } }); - state.keybinds.bind(SDLK_TAB, "audio_tab", [this]() { - if (modalState_ == ModalState::None) { - state_->pages.pop(*state_); - } - }); - refreshDeviceAndTrackLists(); } @@ -393,7 +381,7 @@ void AudioSettingsPage::handleEvent(const SDL_Event& event) { } else if (selectedItem_ == 4) { state_->pages.pop(*state_); } - } else if (key == SDLK_ESCAPE || key == SDLK_TAB) { + } else if (key == SDLK_ESCAPE) { state_->pages.pop(*state_); } } @@ -600,7 +588,7 @@ void AudioSettingsPage::render(SDL_Renderer* renderer) { // 5. Footer Hint footerText_.ensure(renderer, fontSmall_, - "[UP/DOWN] Select [LEFT/RIGHT] Volume [ENTER] Confirm [ESC/TAB] Back", gray); + "[UP/DOWN] Select [LEFT/RIGHT] Volume [ENTER] Confirm [ESC] Back", gray); if (footerText_.texture) { float x = (fw - footerText_.width) / 2.0f; SDL_FRect dst{x, fh - 40.0f, footerText_.width, footerText_.height}; diff --git a/src/date_format_page.cpp b/src/date_format_page.cpp index 8f1695c..eba62d0 100644 --- a/src/date_format_page.cpp +++ b/src/date_format_page.cpp @@ -118,7 +118,7 @@ void DateFormatPage::handleEvent(const SDL_Event& event) statusMessage_ = "Failed to save date format"; } } - } else if (key == SDLK_ESCAPE || key == SDLK_TAB) { + } else if (key == SDLK_ESCAPE) { state_->pages.pop(*state_); } } @@ -212,7 +212,7 @@ void DateFormatPage::render(SDL_Renderer* renderer) } hintText_.ensure(renderer, fontSmall_, - "[UP/DOWN] Choose [ENTER] Apply & Back [ESC/TAB] Back", gray); + "[UP/DOWN] Choose [ENTER] Apply & Back [ESC] Back", gray); if (hintText_.texture) { float x = (fw - hintText_.width) / 2.0f; SDL_FRect dst{x, fh - 40.0f, hintText_.width, hintText_.height}; diff --git a/src/email_address_page.cpp b/src/email_address_page.cpp index bf855f5..11b1417 100644 --- a/src/email_address_page.cpp +++ b/src/email_address_page.cpp @@ -131,7 +131,7 @@ void EmailAddressPage::handleEvent(const SDL_Event& event) } } else if (key == SDLK_RETURN || key == SDLK_KP_ENTER) { submit(); - } else if (key == SDLK_ESCAPE || key == SDLK_TAB) { + } else if (key == SDLK_ESCAPE) { exitPage(*state_); } } @@ -229,7 +229,7 @@ void EmailAddressPage::render(SDL_Renderer* renderer) } hintText_.ensure(renderer, fontSmall_, - "[Type] Enter email [ENTER] Save [BACKSPACE] Delete [ESC/TAB] Back", gray); + "[Type] Enter email [ENTER] Save [BACKSPACE] Delete [ESC] Back", gray); if (hintText_.texture) { float x = (fw - hintText_.width) / 2.0f; SDL_FRect dst{x, fh - 40.0f, hintText_.width, hintText_.height}; diff --git a/src/home.cpp b/src/home.cpp index d490d5a..92bca36 100644 --- a/src/home.cpp +++ b/src/home.cpp @@ -39,7 +39,7 @@ void Home::onPush(AppState &state) { state_ = &state; // Home is the end of the First-Run walkthrough. Reaching it (via the - // walkthrough, TAB, or Settings) means no walkthrough step is active. + // walkthrough or Settings) means no walkthrough step is active. state.provisioningMode = false; syncProclamationsIfEmpty(state); TTF_Init(); diff --git a/src/license_key_page.cpp b/src/license_key_page.cpp index 76a177f..113ebf9 100644 --- a/src/license_key_page.cpp +++ b/src/license_key_page.cpp @@ -140,7 +140,7 @@ void LicenseKeyPage::handleEvent(const SDL_Event& event) } } else if (key == SDLK_RETURN || key == SDLK_KP_ENTER) { submit(); - } else if (key == SDLK_ESCAPE || key == SDLK_TAB) { + } else if (key == SDLK_ESCAPE) { exitPage(*state_); } } @@ -242,7 +242,7 @@ void LicenseKeyPage::render(SDL_Renderer* renderer) } hintText_.ensure(renderer, fontSmall_, - "[Type] Enter key (dashes added automatically) [ENTER] Save [BACKSPACE] Delete [ESC/TAB] Back", gray); + "[Type] Enter key (dashes added automatically) [ENTER] Save [BACKSPACE] Delete [ESC] Back", gray); if (hintText_.texture) { float x = (fw - hintText_.width) / 2.0f; SDL_FRect dst{x, fh - 40.0f, hintText_.width, hintText_.height}; diff --git a/src/log_viewer_page.cpp b/src/log_viewer_page.cpp index f52e669..2c94840 100644 --- a/src/log_viewer_page.cpp +++ b/src/log_viewer_page.cpp @@ -142,7 +142,7 @@ void LogViewerPage::handleEvent(const SDL_Event& event) { scrollOffset_ = std::max(0, scrollOffset_ - 10); } else if (key == SDLK_PAGEDOWN) { scrollOffset_ += 10; - } else if (key == SDLK_ESCAPE || key == SDLK_TAB) { + } else if (key == SDLK_ESCAPE) { state_->pages.pop(*state_); } } @@ -236,7 +236,7 @@ void LogViewerPage::render(SDL_Renderer* renderer) { // 4. Footer Help Line footerText_.ensure(renderer, fontSmall_, - "[UP/DOWN] Scroll [L/F2] Filter Level [S/F3] Sort Order [C] Clear Logs [ESC/TAB] Back", gray); + "[UP/DOWN] Scroll [L/F2] Filter Level [S/F3] Sort Order [C] Clear Logs [ESC] Back", gray); if (footerText_.texture) { float x = (fw - footerText_.width) / 2.0f; SDL_FRect dst{x, fh - 35.0f, footerText_.width, footerText_.height}; diff --git a/src/main.cpp b/src/main.cpp index 02d485d..704a643 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -103,12 +103,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[]) state->db.logEvent("INFO", "Config", "Live configuration hot-reloaded"); }); - state->keybinds.bind(SDLK_TAB, "home", [state]() { - while (state->pages.depth() > 0) { - state->pages.pop(*state); - } - state->pages.push(*state, std::make_unique()); - }); state->keybinds.bind(SDLK_UP, "menu_up", [state]() { state->currentMenuItem = (state->currentMenuItem + 1) % 2; }); diff --git a/src/settings.cpp b/src/settings.cpp index b7cb3d1..f558e4f 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -115,7 +115,7 @@ void Settings::handleEvent(const SDL_Event &event) break; } } - else if (event.type == SDL_EVENT_KEY_DOWN && (event.key.key == SDLK_ESCAPE || event.key.key == SDLK_TAB)) + else if (event.type == SDL_EVENT_KEY_DOWN && event.key.key == SDLK_ESCAPE) { state_->pages.replace(*state_, std::make_unique()); } diff --git a/src/timezone_page.cpp b/src/timezone_page.cpp index 146ffeb..fe87a6c 100644 --- a/src/timezone_page.cpp +++ b/src/timezone_page.cpp @@ -183,7 +183,7 @@ void TimeZonePage::handleEvent(const SDL_Event& event) { } } } - } else if (key == SDLK_ESCAPE || key == SDLK_TAB || key == SDLK_BACKSPACE) { + } else if (key == SDLK_ESCAPE || key == SDLK_BACKSPACE) { if (step_ == Step::Zone) { step_ = Step::Country; statusMessage_ = "Select country, then timezone"; @@ -328,7 +328,7 @@ void TimeZonePage::render(SDL_Renderer* renderer) { // 5. Footer Hint std::string hintStr = (step_ == Step::Country) - ? "[UP/DOWN] Select Country [ENTER] Choose [ESC/TAB] Back to Settings" + ? "[UP/DOWN] Select Country [ENTER] Choose [ESC] Back to Settings" : "[UP/DOWN] Select Timezone [ENTER] Apply Timezone [ESC/BACKSPACE] Back to Countries"; footerText_.ensure(renderer, fontSmall_, hintStr, gray); diff --git a/src/wifi_setup_page.cpp b/src/wifi_setup_page.cpp index ce289d5..c711c02 100644 --- a/src/wifi_setup_page.cpp +++ b/src/wifi_setup_page.cpp @@ -218,7 +218,7 @@ void WiFiSetupPage::handleEvent(const SDL_Event& event) { } } } - } else if (key == SDLK_ESCAPE || key == SDLK_TAB) { + } else if (key == SDLK_ESCAPE) { exitPage(*state_); } } @@ -481,7 +481,7 @@ void WiFiSetupPage::render(SDL_Renderer* renderer) { // 6. Footer Hints (Bottom Bar) footerText_.ensure(renderer, fontSmall_, - "[UP/DOWN] Select [ENTER] Connect [F5] Rescan Networks [ESC/TAB] Back", gray); + "[UP/DOWN] Select [ENTER] Connect [F5] Rescan Networks [ESC] Back", gray); if (footerText_.texture) { float x = (fw - footerText_.width) / 2.0f; SDL_FRect dst{x, fh - 40.0f, footerText_.width, footerText_.height};