fix: * 键在空文本时作为普通字符而非退格键处理

- 当 freetext 为空时,* 应该添加到文本中
- 只有 freetext 有内容时,* 才作为退格键
This commit is contained in:
2026-03-30 18:05:05 +08:00
parent bcd851ff0b
commit 3bae027c5e
@@ -926,8 +926,8 @@ bool CannedMessageModule::handleFreeTextInput(const InputEvent *event)
return handleTabSwitch(event); // Reuse tab logic
}
// '*' key from TCA9535 numpad acts as backspace
if (event->kbchar == '*') {
// '*' key from TCA9535 numpad acts as backspace (only if there's text)
if (event->kbchar == '*' && this->freetext.length() > 0) {
payload = 0x08;
lastTouchMillis = millis();
runOnce();