Background
The current custom keyboard has plugin supports keys ( buttons ) by separating it through two commas custom keys by entering it keys through in the custom Keyboard inputbox, The input box currently has max character length of 51 characters ( 26 English Alphabets and 25 commas )input box each separated out through comma.
Expand | ||||
---|---|---|---|---|
|
| |||
Problem Statement
Statement : 1
In the custom keyboard expected to support 26 Characters Irrespective of the language . But almost all indic languages characters created through combing Base Character + Sound Character.
But We calculate the length limitation through javascript String.length Which does't fit with indian languages.
...
As per requirement user should be allowed to enter maximum of 26 Linguistic Character. Splitting or counting a character linguistically is not straight forward in Javascript.
Statement : 2
The keyboard does allocate a fixed width for each keys by calculating through
No Format |
---|
[ ( Number of Keys / 2 ) / 100 ] %
|
...
Expand | ||
---|---|---|
| ||
Solutions
Solution for Problem Statement 1
Using grapheme splitter to Count the Number of charactersIn the current keyboard layout implementation all the key was fixed to same width. The disadvantage of the design is when applying fixed width for keys with too many characters, the key wraps inside the fixed width and the layout breaks.
Key Design Issues
Solutions
Solution for Key design Issue -1
Code Block | |||
---|---|---|---|
|
...
| |
Telugu
"సింహం అడవి రాజు" character length 9
"పసిఫిక్ సముద్రం ప్రపంచంలోనే అతిపెద్ద సముద్రం" character length 27
Tamil
"சிங்கம் காட்டில் அரசன்" character length 14
"பசிபிக் கடல் உலகிலேயே மிகப் பெரிய கடல் ஆகும்" character length 30
Hindi
"जंगल का राजा शेर है" character length 13
|
Limitations on the solution
On some cases does It does not work exactly as expected
...
color | #c9e3f3 |
---|---|
id | Cases Solution 1 |
Case 1: प्रशांत महासागर दुनिया का सबसे बड़ा महासागर है
Actual number of characters => 30
Grapheme splitter length => 31
Case 2 : க்ஷௌ
Actual Number of character => 1
Grapheme splitter count it as => 2
Acknowledgement from Grapheme Splitter
Grapheme Splitter does't cover 100% the cases due to the requirement of language expertise and sheer number in a possibilities.
Code Block | ||
---|---|---|
| ||
Case 1
"प्र"
Expected value of character length 1
Actual value through grapheme splitter is 2
Case 2
க்ஷௌ
Expected value of character length 1
Actual value through grapheme splitter is 2 |
Solution for Problem Statement 2
...