Created attachment 137447 [details] [review] Pinyin keyboard patch, initial submission. Hi, The attached patch contains a keyboard layout for Hanyu Pinyin (ISO 7098), a Chinese romanization method used officially in China and widely used in education. Typing Hanyu Pinyin can often be difficult for learners as well as educators since there's not many good tools for doing so on, well, desktop computers in general. By contributing this addition I hope to improve the conditions for Linux/X11 users and to some extent other users using XKB's layout data via e.g., libxkbcommon. To simplify learning, numeric keys n ∈ {1..4} corresponding to the nth tone are used for dead keys. Those dead keys are put on Level 3 (AltGr). Level 4 (AltGr+Shift) currently produces the raw diacritics, but that can change if we end up finding a better use in this report. As mentioned in the comment block before the layout, this patch is partially blocked by bug 105167 (zh_CN.UTF-8 has a blank Compose file).
Comment on attachment 137447 [details] [review] Pinyin keyboard patch, initial submission. Review of attachment 137447 [details] [review]: ----------------------------------------------------------------- ::: xkeyboard-config-2.21/rules/base.xml.in @@ +2338,5 @@ > + <configItem> > + <name>altgr-pinyin</name> > + <_description>Hanyu Pinyin (altgr)</_description> > + <languageList> > + <iso639Id>chi</iso639Id> I was not very sure about this one. Although it's designed to be partially extendable for "dialects" (i.e. other Chinese languages), Hanyu Pinyin is mostly restricted to Putonghua, i.e. Mandarin (cmn). There's also the problem of Pinyin not being a primary form of writing out the language, but I am not sure whether I can do a -Latn script tag here. ::: xkeyboard-config-2.21/symbols/cn @@ +208,5 @@ > +// > +// Number row keys 1 2 3 4 are defined as dead-keys for the tones. > +// They correspond to the four tones in Hanyu Pinyin. > +// > +// To generate a raw ü, use AltGr + v. Bugzilla isn't exactly good at UTF-8, is it...
Correction: zh_CN.UTF-8 has all the composes from en_US.UTF-8. The blocker is invalid.
pushed to git, thank you!
Ah, thanks! I hope the blunder I added about missing COMPOSE for zh is removed too?
Err... sorry, I just used your patch as is.
Ah, apologies for bringing that up again. Now I look at it the chunk is actually fine -- it does not say zh COMPOSE is bad or anything. Merging as-is should be fine. Sorry again.
We have a problem here... With your patch, the code is in symbols/cn. but in base.xml.in it is added to dz layout. Could you please attach the fixing patch? Thank you
Created attachment 139152 [details] [review] Correct the misplaced addition Oops, it must be those drifting line numbers and the useless XML contexts! Let me go for "diff -U 7" instead...
Thank you, that was quick. And I updated the group name in the symbols/cn file. Please check from git
Created attachment 139184 [details] [review] Update with "middleperiod" on Altgr-grave Sorry for reopening, but I was reminded that people use the "middle dot" to express neutral sounds in Hanyu Pinyin. This short follow-up patch adds a middle dot for AltGr+grave. Grave/tilde was chosen in part because most Chinese input methods map it to the "middle dot".
Oops, turns out there are a lot of things to add anyway. Let me just open a new bug for the update.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.