Character with multiple diacritics

I am a new user of Keyman Developer, and I am not sure how to get multiple diacritics on a single character. I have defined tilde and star as deadkeys which produce a tilde and a dot above the character. I would like tilde + e to produce ẽ, and star + e to produce ė. This seems to work, but I am not sure how to get ė̃ with both diacritics. I have tried thisː
dk(tilde) + ‘ė’ > U+0065 U+0307 U+0303
This produces the error messageː
Warning: 2084 There are too many characters in the keystroke part of the rule.
Could you please tell me if it is possible to have more than one diacritic on the same character, and if it is how to do it? Thank you.

Welcome to the community, @MaryD! What you are wanting to do is certainly possible – just a small change in your approach is all that is required. The primary thing to remember is that a rule does not work with sequences of keystrokes, but rather works with what is already in the text store and processes that together with a keystroke to generate output (learn more).

You can choose to have sequences of diacritic deadkeys, or to input diacritics after the character, which is often easier to visualize as a user, when you have multiple diacritics.

For diacritic deadkey sequences, you’d do something like this:

+ '*' > dk(star)
+ '~' > dk(tilde)
dk(star) dk(tilde) + 'e' > U+0065 U+0307 U+0303
dk(tilde) dk(star) + 'e' > U+0065 U+0307 U+0303  c allow typing in either order

For typing diacritics after the base, you could do:

'e' + '*' > context U+0307
'e' + '~' > context U+0303
'e' U+0307 + '~' > context U+0303
'e' U+0303 + '*' > 'e' U+0307 U+0303   c swap order of diacritics

The context keyword simply emits the characters to the left of the + symbol.

Thank you! This is very helpful and clear. The desktop keyboard is now working perfectly.

Could I please ask a related question about the virtual/phone keyboard? I am defining longpress keys for the vowels. For ė, I have used the code U_0065_0307, but this creates an error:
Error: 405A Key “U_0065_0307” on “phone”, layer “default” has an invalid identifier.
I have also tried U_0065 U_0307, but this also produces an error message. Could you please tell me the right way to do this? Thank you!

The U_0065_0307 pattern is a Keyman 15 feature (which is currently in development); instead you should use the following, which works in Keyman 10 and later versions:

  1. Define the longpress key id as T_0065_0307 (where T_ is the prefix for custom key identifiers), and
  2. Add a corresponding rule to the .kmn code: + [T_0065_0307] > U+0065 U+0307

Thank you! Everything is working now.

  • Mary
1 Like

This conversation has been resolved.