diff options
| author | Your Name <you@example.com> | 2026-05-18 23:41:19 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-18 23:41:19 +0530 |
| commit | 699fc6c03899c3b1ff853d8c7c6cf32173436354 (patch) | |
| tree | a1dbf26b3d2c6ea3dc12a5c8ee443c00b364bb4d /main/keyboard.c | |
| parent | 9ff7cffcff11237288cfddecee2684f499d23ddf (diff) | |
fix: keyboard KB_START_Y must match render position (70), simplify row 3 layout
- KB_START_Y was 310 but keyboard rendered at y=70 — touch hits never matched
- Row 3 simplified to 3 keys: [layer/shift, space, done]
- All 362 unit tests pass
Diffstat (limited to 'main/keyboard.c')
| -rw-r--r-- | main/keyboard.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/main/keyboard.c b/main/keyboard.c index 741bd08..33365de 100644 --- a/main/keyboard.c +++ b/main/keyboard.c | |||
| @@ -5,21 +5,21 @@ static const char *s_alpha_lower[] = { | |||
| 5 | "qwertyuiop", | 5 | "qwertyuiop", |
| 6 | "asdfghjkl", | 6 | "asdfghjkl", |
| 7 | "\001zxcvbnm\b", | 7 | "\001zxcvbnm\b", |
| 8 | "\002\003 \004" | 8 | "\002\003\004" |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | static const char *s_alpha_upper[] = { | 11 | static const char *s_alpha_upper[] = { |
| 12 | "QWERTYUIOP", | 12 | "QWERTYUIOP", |
| 13 | "ASDFGHJKL", | 13 | "ASDFGHJKL", |
| 14 | "\001ZXCVBNM\b", | 14 | "\001ZXCVBNM\b", |
| 15 | "\002\003 \004" | 15 | "\002\003\004" |
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | static const char *s_numsym[] = { | 18 | static const char *s_numsym[] = { |
| 19 | "1234567890", | 19 | "1234567890", |
| 20 | "-/:;()$&@\"", | 20 | "-/:;()$&@\"", |
| 21 | "\001.,?!'\\b", | 21 | "\001.,?!'\\b", |
| 22 | "\002\003 \004" | 22 | "\002\003\004" |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | #define CTRL_SHIFT '\001' | 25 | #define CTRL_SHIFT '\001' |
| @@ -73,9 +73,7 @@ static int key_width_at(int row, int col, int total_keys) { | |||
| 73 | if (row == 3) { | 73 | if (row == 3) { |
| 74 | if (col == 0) return 42; | 74 | if (col == 0) return 42; |
| 75 | if (col == total_keys - 1) return 50; | 75 | if (col == total_keys - 1) return 50; |
| 76 | if (total_keys == 3 && col == 1) return 168; | 76 | return 168; |
| 77 | if (total_keys == 4 && col == 1) return 168; | ||
| 78 | if (total_keys == 4 && col == 2) return 42; | ||
| 79 | } | 77 | } |
| 80 | return KB_KEY_W; | 78 | return KB_KEY_W; |
| 81 | } | 79 | } |