Search code examples
unicodekeyboardimekeymankeyman-developer

Keyman developer 10 won't match rules in Odia script


I'm making a custom keyboard for Oriya/ Odia script with Keyman developer 10 but it won't do contextual substitutions when all the input is in Odia script. For example

+ [K_K] > U+0B15
+ [K_T] > U+0B24
U+0B15 + U+0B24 > U+0B15 U+0B4D U+0B24
"a" + "b" > U+0B15 U+0B4D U+0B24
U+0B15 + [K_C] > U+0B15 U+0B4D U+0B24

When I test his, I get the desired output when I type 'ab' or 'kc' but not with 'kt'. Any help to explain why line 3 won't work but line 4 does will be appreciated.

I do get this error sometimes when Targets is set to 'any' rather than 'windows'

warning 209A: The rule will never be matched because its key code is never fired.

Solution

  • The reason this isn't working is you are trying to match on a Unicode value instead of a keystroke on line 3:

    U+0B15 + U+0B24 > U+0B15 U+0B4D U+0B24
    

    Instead of U+0B24, which is a Unicode character, you need to match on the keystroke, for example:

    + [K_K] > U+0B15
    + [K_T] > U+0B24
    U+0B15 + [K_T] > U+0B15 U+0B4D U+0B24
    

    As this third rule has a longer context (U+0B15), it takes precedence over the second rule.

    An alternate way to solve this issue is to use a post-processing group. In this model, the output from the first group is fed into the context of the second group. Note that the second group does not include a using keys clause.

    group(main) using keys
    
    + [K_K] > U+0B15
    + [K_T] > U+0B24
    match > use(post)
    
    group(post)
    
    U+0B15 U+0B24 > U+0B15 U+0B4D U+0B24