Warning: The rule will never be matched because its key code is never fired

For Azerbaijani Turkish, we have the following dilemma:

First, we assign the keys according to the Azeri assignments:

+ "]" > "ğ"

If we try to create a rota-based rule for such keys,

like:

          "ğ" + "ğ" > "ğ'"   c voiced pharyngeal fricative /ʕ/
          "ğ'" + "ğ" > "ğ"   c returns to 'ğ'

we get the warning message:

xxx.kmn: Warning: line 129  warning 209A: The rule will never be matched because its key code is never fired.

This seems like a bug. Can we fix it?

Thank you, everyone!

Hi Ken! There’s no bug here. :slight_smile: The issue is that you are attempting to match on the output of the keystroke instead of on the key itself. Here’s what the rota rules should look like:

         "ğ" + "]" > "ğ'"   c voiced pharyngeal fricative /ʕ/
         "ğ'" + "]" > "ğ"   c returns to 'ğ'

I sometimes find it helpful to use virtual key identifiers instead of characters to help differentiate and remind me that the content between the + and the > is always a key identifier, not a character:

         "ğ" + [K_LBRKT] > "ğ'"   c voiced pharyngeal fricative /ʕ/
         "ğ'" + [K_LBRKT] > "ğ"   c returns to 'ğ'

Or, for mnemonic layouts (admittedly much more confusing – because we match on the default output of the Latin-script keyboard key – but still never the output of the Keyman keyboard rule!):

         "ğ" + ['['] > "ğ'"   c voiced pharyngeal fricative /ʕ/
         "ğ'" + [']'] > "ğ"   c returns to 'ğ'

Hope this helps :slight_smile:

Hi Marc, Okay, now the keyboard compiles and behaves correctly. Thanks for your insight. Only in this case, it is:

“ğ” + [K_RBRKT] > “ğ’” c voiced pharyngeal fricative /ʕ/

“ğ’” + [K_RBRKT] > “ğ” c returns to ‘ğ’

1 Like

LBRKT, RBRKT :slight_smile: sorry!