bluetooth: fix BLE/HID keyboard & mouse pairing, auto-bypass T9 on external keyboard, and show mouse cursor

This commit is contained in:
Luxferre committed 2026-11-03 20:24:54 +02:00
1 parent b9e7c6847b
commit 02ce3ab1f4
67 files changed
+1227 -293

No files matched your search

+23 -14
View File
@@ -706,6 +706,8 @@ int runSmsApp(int argc, char** argv) {
const char* modeBadge = "[Abc]";
if (composeField == 0) {
modeBadge = "[123]";
} else if (isExternalKeyboardActive()) {
modeBadge = "[KBD]";
} else if (caseMode == TextCaseMode::Upper) {
modeBadge = "[ABC]";
} else if (caseMode == TextCaseMode::Lower) {
@@ -1393,7 +1395,7 @@ int runSmsApp(int argc, char** argv) {
} else if (ev.type == KeyPress) {
int64_t tNow = nowMs();
unsigned int kc = ev.xkey.keycode;
KeySym sym = XLookupKeysym(&ev.xkey, 0);
KeySym sym = XLookupKeysym(&ev.xkey, (ev.xkey.state & ShiftMask) ? 1 : 0);
bool isLeftSk =
(kc == 135 || sym == XK_Menu || sym == XF86XK_KbdLcdMenu1 ||
@@ -1576,19 +1578,26 @@ int runSmsApp(int argc, char** argv) {
drawUI();
}
} else if (composeField == 1) {
if (d == '#') {
lastTapDigit = -1;
caseMode = static_cast<TextCaseMode>(
(static_cast<int>(caseMode) + 1) % 4);
drawUI();
} else if (d == '*') {
commitMultiTapChar(1);
drawUI();
} else if (d >= '0' && d <= '9') {
commitMultiTapChar(d - '0');
drawUI();
} else if (sym == XK_space) {
composeText.push_back(' ');
if (!isExternalKeyboardActive()) {
if (d == '#') {
lastTapDigit = -1;
caseMode = static_cast<TextCaseMode>(
(static_cast<int>(caseMode) + 1) % 4);
drawUI();
continue;
} else if (d == '*') {
commitMultiTapChar(1);
drawUI();
continue;
} else if (d >= '0' && d <= '9') {
commitMultiTapChar(d - '0');
drawUI();
continue;
}
}
if (sym >= 0x20 && sym <= 0x7e &&
!(ev.xkey.state & (ControlMask | Mod1Mask))) {
composeText.push_back(static_cast<char>(sym));
lastTapDigit = -1;
drawUI();
}