Incorporating dead keys / composing for Slavic languages keyboard layouts - Slovak specifically. #2711
martinm37
started this conversation in
Custom Layout
Replies: 2 comments
|
Okay so, after looking further into this, what I am looking for is a "compose key" feature. This key would modify the key that was entered before it, which is the example in the Thai keyboard. Is such a feature supported by HeliBoard? Roughly speaking, it would be like the |
0 replies
|
The |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi people, could you please help me with what I am trying to achieve?
(AI disclosure: I have used Mistral AI as an advanced google search and discussion partner, to try to figure out the difference between Slovak dead key system, and Thai composing system. This was my only use of AI, as I am not knowledgeable in their under the hood implementation.)
I am trying to create a new keyboard layout for the Slovak language, that would be using the dead key / composing keys, not sure which one is the way.
Right now the Slovak keyboard is the default QWERTZ, with pop-ups for accents:
We have two main accents: caron (ˇ) and acute accent (´). These can create letters such as these: á, é, í, ó, ú, ž, š, ť, ľ, ň etc.
Then we have two more special letters: ô and ä.
I do not like to use the pop-ups to create the letters with accents, as I find them to take too long if I try to type fast, and their usage is clumsy. Also, adding all of the combinations of (ˇ) and (´) just makes the keyboard way too cluttered, and difficult to use. I tried it, it is just not good.
What I would like to do instead, would be to do something like what the Thai keyboard does:
I do not know Thai language at all, but from briefly trying the keyboard, I can see that the small letter keys, located in the middle of the keyboard, are used to alter the big letter keys, located on the sides of the keyboard. I would like to achieve exactly this behavior. This also works out of the box on the Slovak Windows / Linux keyboard: you first press (ˇ), then you press (s), and from this you get (š).
To implement such a similar solution, I have added ô and ä to the keyboard directly, as those two are the only examples of those accents. Then I have added the (´) and (ˇ) keys on the left and right ends of the 2nd row of the keyboard respectively. (Also I have used the QWERTY base). See my attempt below:
With this json:
I have used the
"labelFlags": 128from looking at the json for Thai layout. Not sure if this was the correct usage at all. I have struggled to find docs for this, the https://github.com/HeliBorg/HeliBoard/blob/main/layouts.md is not very descriptive in how to use thelabelFlagsand their values.But the above does not work. Analogous to my Windows / Linux example, if I press (ˇ), and then (s), I get (ˇs). I.e. the characters are not combined.
From discussing with Mistral AI, it looks like Slovak uses dead key system https://en.wikipedia.org/wiki/Dead_key#Dead_keys_on_various_keyboard_layouts , with the use of precomposed characters https://en.wikipedia.org/wiki/Precomposed_character . The Thai on the other hand, uses a composing system, where apparently separate unicode characters are added together to form the final one. I checked the links that AI provided for the dead key system, it agrees with what it said, but I am not an expert in this at all.
Here I have hit the roadblock, and I do not know how to move forward. Either Slovak also supports the composing system like Thai where I should be able to combine (ˇ) and (s), to get (š), but I did not implement this correctly in the json. Or Slovak does not support it, in which case my question would be: can I somehow use the dead key system in the json layout?
Many thanks for reading.
All reactions