Namaste. I am using Keyman 12.0.55 with LibreOffice 6.3.0 on Windows 10 and facing a problem with a keyboard I am creating. I provide as minimal test case the following code:
+ "k" > $ka $virama
+ "a" > $vowelAOut
$virama + "a" > nul
$vowelAOut + any(aBasedVowelsIn) > index(aBasedVowelsIndepOut, 2)
$ka + any(aBasedVowelsIn) > context index(aBasedVowelsDepOut, 2)
If it is fed Devanagari characters as seen below:
store(ka) U+0915
store(virama) U+094D
store(vowelAOut) U+0905
store(aBasedVowelsIn) "aiu"
store(aBasedVowelsIndepOut) U+0906 U+0910 U+0914
store(aBasedVowelsDepOut) U+093E U+0948 U+094C
โฆ it is working and I am able to get เค เค เค เคเคพ เคเฅ เคเฅ by typing โaaโ โaiโ โauโ โkaaโ โkaiโ โkauโ.
However the same code does not work if it is fed Grantha characters:
store(ka) U+11315
store(virama) U+1134D
store(vowelAOut) U+11305
store(aBasedVowelsIn) "aiu"
store(aBasedVowelsIndepOut) U+11306 U+11310 U+11314
store(aBasedVowelsDepOut) U+1133E U+11348 U+11357
โฆ and while I get ๐ ๐ ๐ for โaa ai auโ, I do not get ๐๐พ ๐๐ ๐๐ for โkaaโ โkaiโ โkauโ. Instead, the last input vowel fails to combine and the output is: ๐๐ ๐i ๐u.
I also tested Bengali, Tamil and Brahmi, and find that BMP scripts work fine whereas SMP scripts do not. I wonder if this has something to do with UTF-16 representation of the input character?
I also found that this happens only if output the virama for the basic consonant keystroke and remove it with โaโ. If I instead do not use the virama to be cancelled by โaโ and replace the first three lines of my programming with just:
+ "k" > $ka
+ "a" > $vowelAOut
โฆ then the sequences โkaโ โkiโ โkuโ output ๐๐พ ๐๐ ๐๐ correctly as expected. So the problem arises only with using the virama and cancelling, and that too only with SMP scripts as mentioned above.
I also wonder whether the following passage in the named constants reference (apparently I canโt display it even by removing http://
because I am a โnew userโ on this forum) has something to do here, because I am using named consonants (may not seem necessary in above minimal example but makes for readability in full code) -
Named constants are supported for characters above plane 0.
Seeing the above behaviour (and considering why such a statement would at all be necessarsy) I wonder if it should actually read โare not supportedโ!
Any help would be appreciated. Thanks!