Merge 4462bfd5efeeb92d045163b8129a06377524cb0a into 3ce11f14ce7bc3ce1f2f040bfb09a9b3d9f87f72

This commit is contained in:
Justin 2026-01-21 17:08:09 +01:00 committed by GitHub
commit 60009c51e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,10 @@ const char* const KeyboardEntryActivity::keyboard[NUM_ROWS] = {
const char* const KeyboardEntryActivity::keyboardShift[NUM_ROWS] = {"~!@#$%^&*()_+", "QWERTYUIOP{}|", "ASDFGHJKL:\"", const char* const KeyboardEntryActivity::keyboardShift[NUM_ROWS] = {"~!@#$%^&*()_+", "QWERTYUIOP{}|", "ASDFGHJKL:\"",
"ZXCVBNM<>?", "SPECIAL ROW"}; "ZXCVBNM<>?", "SPECIAL ROW"};
namespace {
constexpr unsigned long capsMs = 1000;
}
void KeyboardEntryActivity::taskTrampoline(void* param) { void KeyboardEntryActivity::taskTrampoline(void* param) {
auto* self = static_cast<KeyboardEntryActivity*>(param); auto* self = static_cast<KeyboardEntryActivity*>(param);
self->displayTaskLoop(); self->displayTaskLoop();
@ -94,6 +98,7 @@ void KeyboardEntryActivity::handleKeyPress() {
if (selectedCol >= SHIFT_COL && selectedCol < SPACE_COL) { if (selectedCol >= SHIFT_COL && selectedCol < SPACE_COL) {
// Shift toggle // Shift toggle
shiftActive = !shiftActive; shiftActive = !shiftActive;
updateRequired = true;
return; return;
} }
@ -234,7 +239,11 @@ void KeyboardEntryActivity::loop() {
// Selection // Selection
if (mappedInput.wasPressed(MappedInputManager::Button::Confirm)) { if (mappedInput.wasPressed(MappedInputManager::Button::Confirm)) {
if (mappedInput.getHeldTime() >= capsMs) {
shiftActive = !shiftActive;
} else {
handleKeyPress(); handleKeyPress();
}
updateRequired = true; updateRequired = true;
} }