Remove TAB keybindings

This commit is contained in:
NeilClack
2026-08-13 14:37:35 -05:00
parent 4abcfa473f
commit fe2c9ba6a5
10 changed files with 16 additions and 34 deletions
+2 -14
View File
@@ -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};
+2 -2
View File
@@ -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};
+2 -2
View File
@@ -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};
+1 -1
View File
@@ -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();
+2 -2
View File
@@ -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};
+2 -2
View File
@@ -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};
-6
View File
@@ -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<Home>());
});
state->keybinds.bind(SDLK_UP, "menu_up", [state]() {
state->currentMenuItem = (state->currentMenuItem + 1) % 2;
});
+1 -1
View File
@@ -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<Home>());
}
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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};