Structure:Handwriting input
Handwriting input for the current text input field is stored in a structure that specifies the handwriting script and the list of potential matches for each entered character.
| Offset | Type | Name | Description |
|---|---|---|---|
| 0 | int | script | The handwriting script being recognised. |
| 4 | handwriting_matches[28] | matches | Possible matches for each entered character. |
| 676 | byte[28] | match_index | The index in the matches table for the character in the string at the specified index, or -1 if not present. |
As handwriting is entered items lists of potentially-matching characters are appended to the handwriting_matches array. Each entry lists the number of potential matches then character values for each potential match:
| Offset | Type | Name | Description |
|---|---|---|---|
| 0 | short | count | The number of potential matches. |
| 2 | short[11] | characters | Possible matches for each written or typed character. |
A maximum of 10 potential characters can be shown on the sub-LCD so the count will not exceed 10.
Matches are appended to the array in the order in which they were entered, so the match_index list can be used to determine which set of matches correspond to which character in the text input field.
For example, if you typed "ab" then pressed the left cursor key twice and typed "c" the display would show "cab". The list of matches would be for "a", "b" and "c" as that was the order they were typed. The list of indices would contain 2, 0, 1 so you could determine that the first character ("c") is stored in matches[2], the second character ("a") is stored in matches[0] and the third character ("b") is stored in matches[1].