pinyin
It would be perfect if it could support pinyin input, for me
This would requires word-correction/prediction ? The keyboard do not support that at the moment.
Wikipedia says Pinyin is a way to express Chinese words using Roman letters. It should be doable with a custom layout and wouldn't require any new magic by Unexpected itself. There are "initials" (consonants) and "finals" (vowels), the latter modified by accents to select one of the four tones of Mandarin. It has been around for long enough that it obeyed the limitations of typewriters, so surely UNICODE has all the needed characters.
This might start with the QWERTY layout, with four swipes defined over each vowel. Or separate out the consonants from vowels, eliminate unused letters, and optimize based on native use.
I'm looking at https://www.chinese-tools.com/tools/pinyin-editor.html —It provides a, e, i, o, u, and ü (umlaut), each with the macron, acute, grave, and caron accents, relying on UK or other soft keyboard for the initials. All these finals can already be produced by Unexpected.
To set up: Swipe the gear logo, select Add keys to the keyboard, and check the five accents you will need. Back out to the keyboard. Now, for instance, swipe umlaut, swipe acute, and type u, which you will see now appears as: ǘ!
This is awfully cumbersome, so the final step is preparing a custom layout, where all 24 (6×4) finals are a single gesture, or even have their own key. @xcccdjsn, please reply if you need help with this.
For example, modifying my QWERTY layout:
PS—I was not able to make the ǚ character, either by combining caron-umlaut-u, umlaut-caron-u, or with the new Compose key. I have a copy of the X11 mapping, but it requires a key that is not our caron prefix. Saved time by copypasting ǚ from the X11 file into my Pinyin file. Now, I was able to make it by typing caron-ü (though it was already there).
Here's the whole keyboard:
And here is the code (please remove ".txt"):
Julow Pinyin.xml.txt
@Spike-from-NH ,Thank you very much for answering my needs. Your solution is very good, but I am very sorry. I most likely expressed it wrong. Actually what I want to express is that you can input Chinese characters.
This would requires word-correction/prediction ? The keyboard do not support that at the moment.
This would requires word-correction/prediction ? The keyboard do not support that at the moment.
No, as long as you can type Chinese characters normally, it will be fine. Currently, my technology is not able to meet these requirements, and I can’t trouble you too much. I would be very grateful if it could support the output of Chinese characters. This would be a perfect product for me, and of course it is great now.
Actually what I want to express is that you can input Chinese characters.
@xcccdjsn, that is a lot to ask of a "lightweight keyboard." Perhaps a solution is to type Pinyin into Google Translate to get the Chinese characters. Also, the F-Droid repository has a phone app that lets you compose Chinese characters from the brush strokes.
Actually what I want to express is that you can input Chinese characters.
@xcccdjsn, that is a lot to ask of a "lightweight keyboard." Perhaps a solution is to type Pinyin into Google Translate to get the Chinese characters. Also, the F-Droid repository has a phone app that lets you compose Chinese characters from the brush strokes.
It is indeed true, but so far I have found only this keyboard with the most complete keys and customizability. Maybe another solution can support configuration files like trime. How about trying to be compatible with trime configuration files?
① That's a question for @Julow. ② Jules, perhaps copy my Pinyin XML above to your directory of useful experiments. ③ While working on this, I too "locked myself out of the house" by inserting a typo into an active layout. I used Samsung keyboard to fix the error, am unsure how I revived Unexpected. Is it worth coding a way to force a revert to QWERTY?—either by pop-up if the active layout is bad, or adding another button to the initial screen?
PS—I remember how I revived Unexpected after installing an active layout with bad syntax: I rotated the device! so as to pick up a different layout that was sound, with which to copypaste the corrected layout. Won't work for everyone.