mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
feat(keyboard): show digit on each T9 key; complete v1.22 docs
T9 keys now read like a phone keypad — each cell is labelled <digit><group>
(e.g. 2abc), with the digit matching what the multi-tap cycle lands on after
the letters. No separator space: the widest group (".,!?'-") plus the digit
already fills a narrow 128px OLED cell at 3 columns.
Also fills in the v1.22 release notes (T9 keyboard, trail auto-save, Clock
Tools in Tools, Map/Shutdown reorderable, battery-read fix, the UI-audit fix
batch, discover-dedup, favourites self-heal, preset-name placeholder, OLED
frame-skip, e-ink full-refresh) and syncs the solo-feature docs: new Keyboard
settings section, Trail Auto-save row, and Clock Tools reachable from Tools.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -169,15 +169,18 @@ struct KeyboardWidget {
|
||||
for (int c = 0; c < cols; c++) {
|
||||
bool sel = (row == r && col == c);
|
||||
int cell = r * cols + c;
|
||||
char group[10];
|
||||
strncpy(group, KB_T9_GROUPS[page][cell], sizeof(group) - 1);
|
||||
group[sizeof(group) - 1] = '\0';
|
||||
if (caps) for (char* p = group; *p; p++) if (*p >= 'a' && *p <= 'z') *p = *p - 'a' + 'A';
|
||||
// Label the cell "<digit><group>" so it reads like a phone keypad. The
|
||||
// digit is what the multi-tap cycle lands on after the letters (see
|
||||
// handleInput: '1'+cell). No separator space — the widest group
|
||||
// (".,!?'-", 6 chars) + digit already fills a narrow OLED cell.
|
||||
char label[10];
|
||||
snprintf(label, sizeof(label), "%c%s", (char)('1' + cell), KB_T9_GROUPS[page][cell]);
|
||||
if (caps) for (char* p = label; *p; p++) if (*p >= 'a' && *p <= 'z') *p = *p - 'a' + 'A';
|
||||
int cx = c * cell_w;
|
||||
display.drawSelectionRow(cx, y - 1, cell_w - 1, cell_h, sel);
|
||||
int tw = display.getTextWidth(group);
|
||||
int tw = display.getTextWidth(label);
|
||||
display.setCursor(cx + (cell_w - tw) / 2, y);
|
||||
display.print(group);
|
||||
display.print(label);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user