Bug: Chinese, Mandarin keyboard fails to show Chinese IME suggestions


On both my local implementation of KeymanWeb 11.0.224 and online on KeymanWeb > Chinese, Mandarin, the Chinese character suggestions don’t show up. Instead on each keystroke an error is logged:

Uncaught TypeError: KeymanWeb.ShowPinnedHelp is not a function
at Keyboard_chinese.show (chinese-1.0.js:formatted:136)
at Keyboard_chinese.showCandidates (chinese-1.0.js:formatted:309)

Interestingly when I press PgDn, the suggestions show up. I could hack a workaround which adds PgDn+PgUp keystrokes after the user’s every character, but this bug is probably just a simple typo?

BTW, where is the proper GitHub repo to post this issue on, if not here?



Welcome Jacob. That’s a really old keyboard, and it does not look like we have the original source for it.
However, you can create an issue here [https://github.com/keymanapp/keyboards/issues] and, we’ll look into it.



Thanks, Lorna! I’ve created the issue there.
Somewhat related, I’m using KeymanWeb in an Angular web app and wrote up a guide since it took me quite some time to figure out how to implement it in such an environment. Is there a good place that I could post that for others to easily find, or someone I could pass it on to?
Article: https://medium.com/@jwbowdoin/setup-on-screen-keyboards-in-over-1-000-languages-using-keyman-11-in-an-angular-7-web-app-3c3eb846585c
Repo: https://github.com/jacobbowdoin/keymanweb-angular



Yes, it is a really old keyboard, but I think we do have source (currently in a private keyman-keyboards-internal repo, Chinese-Japanese-Korean KMW folder, not in the public repo). See also https://github.com/keymanapp/keyboards/pull/64 for a Windows equivalent which also needs work.

A few notes:

  • It depends on a database backend which is still running on legacy infrastructure.
  • It’s not written in .kmn; it’s written directly in JavaScript.
  • The source that we do have would take some time to organise and publish; it’s not well organised and needs careful preparation.
  • I think the bug arises because the KeymanWeb API shifted and we missed this keyboard in testing (@jahortonShowPinnedHelp does not seem to be implemented now?)
  • The source also includes Japanese, Korean and Chinese (Traditional) input methods, not all of which have been published.

Issue: https://github.com/keymanapp/keyboards/issues/682



Great article! The feedback on gaps in the documentation is appreciated (you can also add issues for documentation or even submit pull requests at keymanapp/help.keyman.com). I’ll get the rest of the Keyman team to read it too; they may have ideas for you.

FWIW: I was curious about the scaling issues you noted with Stackblitz. The issues seem to be because the images, fonts and CSS are not being handled correctly; .scss has the wrong mime type (text/plain) so it is being ignored; keymanweb-osk.ttf may have the wrong URL; it is downloading JavaScript instead of the font resource; some images have 403 or mime type issues.

I’ve shared the article on Keyman social media:



Thanks for the posts and the info, Marc!

I especially appreciate the documentation link as the number of different keyman related repos is a little hard to sort through at first. As I learn more about the engine and my thoughts coalesce, I think I’ll try submitting improvements through pull requests.

This is the second time I’ve tried to pull a big tool that is not an Angular-friendly NPM package into my project, and both times it’s been a bit of a struggle. So yes, there is definitely room for improvement on how I’m handling the images, fonts, and CSS (and I have much to learn). This was just the first configuration that I could get to actually work. :slight_smile:

I’ll share a link to our production app later on when my keyboard addition reaches the surface.



Understood. NPM is on our roadmap … but it’s not a small project and we definitely have a lot of room for improvement ourselves. :wink: For example, the CSS in KeymanWeb is ancient and desperately needs rewriting (preferably in .scss).

I look forward to seeing the production app in the future!



Fix for the ShowPinnedHelp error is in motion: https://github.com/keymanapp/keyman/issues/1742



This has now landed. Took longer than we planned due to some Continuous Integration issues. Try at https://keymanweb.com/#cmn,Keyboard_chinese



Awesome! Thanks for the quick help.

I found a few more bugs with the Chinese and Japanese keyboards and posted a new issue: https://github.com/keymanapp/keyman/issues/1754



Thanks for the clear and detailed bug report :slight_smile: I may have a crack at some of these on my return to Australia in a few days; the mobile support is probably a bigger thing because they’ve never been supported on mobile, but the other issues are certainly easily fixable.