fix: * 键在空文本时作为普通字符而非退格键处理
- 当 freetext 为空时,* 应该添加到文本中 - 只有 freetext 有内容时,* 才作为退格键
This commit is contained in:
@@ -926,8 +926,8 @@ bool CannedMessageModule::handleFreeTextInput(const InputEvent *event)
|
|||||||
return handleTabSwitch(event); // Reuse tab logic
|
return handleTabSwitch(event); // Reuse tab logic
|
||||||
}
|
}
|
||||||
|
|
||||||
// '*' key from TCA9535 numpad acts as backspace
|
// '*' key from TCA9535 numpad acts as backspace (only if there's text)
|
||||||
if (event->kbchar == '*') {
|
if (event->kbchar == '*' && this->freetext.length() > 0) {
|
||||||
payload = 0x08;
|
payload = 0x08;
|
||||||
lastTouchMillis = millis();
|
lastTouchMillis = millis();
|
||||||
runOnce();
|
runOnce();
|
||||||
|
|||||||
Reference in New Issue
Block a user