Conversation
|
When will CardKB2 be released? |
CardKB2 is expected to be released next Friday. |
OMG! Question about KEY index constants vs key_map alignment The
This also affects Additionally, if (kidx == 34) { // sym — but KEY_SYM is 33
if (kidx == 22) { // caps — but KEY_AA is 21
Is this intentional (i.e. two separate indexing schemes), or should the KEY_* constants match the key_map indices (KEY_Q = 11, KEY_AA
= 22, KEY_SYM = 34, etc.)?
|
|
Thank you for reminding me; I’ve already made the changes. |
|
I gave a quick review of the latest version. 1. Debug printf in
|
| Char | ASCII | character_map points to | key_map[that][sym] | Expected KEY (based on key_map) |
|---|---|---|---|---|
" |
34 | KEY_P (20) | = |
KEY_H (28) → " |
- |
45 | KEY_H (28) | " |
KEY_I (18) → - |
_ |
95 | KEY_I (18) | - |
KEY_U (17) → _ |
These look like a circular shift — could you double-check?
Mode bit mismatches (2 entries):
| Char | ASCII | character_map mode | key_map location |
|---|---|---|---|
, |
44 | 1+2 (normal+shift) |
key_map[40 (n)][2] — sym mode (should be 4) |
. |
46 | 1+2 (normal+shift) |
key_map[41 (m)][2] — sym mode (should be 4) |
3. readHardwareType() — missing implementation?
Declared in unit_CardKB2.hpp but I don't see a definition in the cpp file. Is the implementation coming later, or should the declaration be removed for now?
4. Fn key handling in UART mode
In update(), the UART code path handles Sym and Caps (Aa) but I don't see any handling for Fn (KEY_FN=33). There's no path that reads key_map[][3] (fn mode), so it looks like direction keys (Fn+Z/D/X/C) and ESC (Fn+1) won't work over UART. Is Fn support planned for a later update?
5. Fn direction key values vs datasheet
I compared the SCHAR_* constants with the datasheet (V2) and the numeric values appear swapped pairwise:
| Key | Datasheet | Code |
|---|---|---|
| Fn+D (Up) | 180 | 181 (SCHAR_UP) |
| Fn+Z (Left) | 181 | 180 (SCHAR_LEFT) |
| Fn+C (Right) | 182 | 183 (SCHAR_RIGHT) |
| Fn+X (Down) | 183 | 182 (SCHAR_DOWN) |
The direction-to-key assignment is correct, but the numeric codes are swapped. Which is authoritative — the datasheet or the code?
6. Sym mode z/x/c — uppercase vs lowercase
The datasheet Sym table shows uppercase Z(0x5A), X(0x58), C(0x43), but key_map uses lowercase z(0x7A), x(0x78), c(0x63). Is this intentional?
|
Thank you for reviewing this. |
56ec20d to
fca95d2
Compare
|
Thanks for the fixes! I'll merge this and take care of the remaining minor cleanup (removing the commented-out printf and the Therefore, I would like you to send CardKB2 to me. |
🤝 CardKB2 and other EOL products are scheduled to ship tomorrow . |
|
@TinyuZhao |
So that's where it was hidden. What a strange interface design. I don't understand why I have to click "Change Title" first when changing the merge target.
|
|
I have granted you “Write” permissions. Please give it a try. |
The merge target has been successfully changed |




No description provided.