I've just found a possibility to use lexical model in Keyman to type Kanji

I have just found a possibility to use lexical model to type Kanji or character on the phone.

The first step I added a kanji with it’s romanization such as “kying經”
When I type kying, the lexical model will suggest me the word “kying經”
then I can choose the word “kying經”
Then I will set a rule in keyman kmx file, “kying經” + any(key) > “經”
In that way, I can remove the romanization part and just remain the kanji

However this method have several disadvantages.
The current keyman lexical model only allows 3 candidates. That mean I can only type 3 kanji by one romanization for maximum.
The next disadvantage is that the code will become too long and too complexed if I want to type thousand of kanjis with one keyboard.

I hope if keyman is planning to develop a IME, the IME on the phone can be considered at first. and can be modified directly from the lexical model, we can add a larger selected window and extendable select window, and add rules to automatically delete the romanization which added before the kanji when we type it on our phone.

Yes, it’s possible but it’s not a great fit. See feat(common): cross-platform IMX (picker) support · Issue #7928 · keymanapp/keyman · GitHub for more discussion on lexical models and IME interfaces. We are not planning to work on IME in 2025 due to capacity constraints.

In this morning, I just get a idea to have more than 3 candidates in the lexical model

for example, I can set the lexical model like this
kying;A
kying;B
kying;C
kying#;D
kying#;E
kying#;F
kying##;G
kying##;H
kying##;I
I will add a page-down icon on the screen, the page-down icon in fact it is simply a # key.
of course we can choose a less common symbol and more invisible symbol.

In this way, I can store 9 kanji in one romanization

on the other way, I can store each romanizations and set a rule

any(romanizations) “;” any(character) + any(key) > index(character, 1)
any(romanizations) any(romanizations) “;” any(character) + any(key) > index(character, 2)
any(romanizations) any(romanizations) any(romanizations) “;” any(character) + any(key) > index(character, 3)

any(romanizations) “#;” any(character) + any(key) > index(character, 1)
any(romanizations) any(romanizations) “#;” any(character) + any(key) > index(character, 2)
any(romanizations) any(romanizations) any(romanizations) “#;” any(character) + any(key) > index(character, 3)

In this way, I can wipe off the romanization before the character with just dozens of rules. instead of setting one rule for each characters.