How to add consonants to my keyboard with keyman

27 Views Asked by At

I'm trying to make a keyboard with keyman in which the consonants are included in the structure of the alphabet. That is, Ra is an extension of R. And the symbol to represent Ra is a modified version of the character R. Something similar to Devnagari.

I know that one can use dead keys to modify the formating of a character. But I want functionality such that the consonants are added after the characters.

I tried doing this by applying a dead key state to every character on the keyboard. Such that when you press a key, the keyboard will show the corresponding symbols for the consonants+character of the pressed key for you to choose from. But this doesn't allow efficient typing. As you have to exit the dead key state everytime you press a key.

1

There are 1 best solutions below

0
Marc Durdin On

If I understand your question correctly, you want to be able to type a consonant, and then have it modified by the following keystroke.

This can be accomplished in Keyman by manipulating the context, for example, here I use 'R' as the consonant, and 'Ŕ' as the consonant with a vowel:

+ 'r' > 'R'
'R' + a' > 'Ŕ'

Pressing r will emit a R. The next keystroke, a will remove the R and replace it with Ŕ. This basic pattern illustrates how you can replace existing text with new output.

See https://help.keyman.com/developer/language/guide/rules for more information on how context and rules work.