mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 06:37:38 +03:00
Merge 4462bfd5ef into d403044f76
This commit is contained in:
commit
97a5332713
@ -13,6 +13,10 @@ const char* const KeyboardEntryActivity::keyboard[NUM_ROWS] = {
|
||||
const char* const KeyboardEntryActivity::keyboardShift[NUM_ROWS] = {"~!@#$%^&*()_+", "QWERTYUIOP{}|", "ASDFGHJKL:\"",
|
||||
"ZXCVBNM<>?", "SPECIAL ROW"};
|
||||
|
||||
namespace {
|
||||
constexpr unsigned long capsMs = 1000;
|
||||
}
|
||||
|
||||
void KeyboardEntryActivity::taskTrampoline(void* param) {
|
||||
auto* self = static_cast<KeyboardEntryActivity*>(param);
|
||||
self->displayTaskLoop();
|
||||
@ -94,6 +98,7 @@ void KeyboardEntryActivity::handleKeyPress() {
|
||||
if (selectedCol >= SHIFT_COL && selectedCol < SPACE_COL) {
|
||||
// Shift toggle
|
||||
shiftActive = !shiftActive;
|
||||
updateRequired = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -234,7 +239,11 @@ void KeyboardEntryActivity::loop() {
|
||||
|
||||
// Selection
|
||||
if (mappedInput.wasPressed(MappedInputManager::Button::Confirm)) {
|
||||
if (mappedInput.getHeldTime() >= capsMs) {
|
||||
shiftActive = !shiftActive;
|
||||
} else {
|
||||
handleKeyPress();
|
||||
}
|
||||
updateRequired = true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user