Use a virtual event so enter on keyboard calls changeHandler() immediately

This commit is contained in:
Cliff(dlktdr)
2021-09-16 19:00:48 +10:00
committed by Peter Feerick
parent c8f79c95a2
commit 06fb5b0e18
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -108,6 +108,9 @@ void TextEdit::onEvent(event_t event)
changed = true;
}
}
else if (c == (uint8_t)KEYBOARD_ENTER[0]) {
changeEnd();
}
else if (cursorPos < length) {
memmove(value + cursorPos + 1, value + cursorPos, length - cursorPos - 1);
value[cursorPos++] = c;