Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
1.92k stars 68 forks source link

CJKV character support (IMEs) #452

Open mvevitsis opened 5 months ago

mvevitsis commented 5 months ago

Is your feature request related to a problem? Please describe.

Can't type east asian languages

Describe the solution you'd like

Keyboard layouts/IMEs for Chinese (qwerty, 9 key) Japanese (qwerty, 12 key) Korean (dubeolsik, chungjin) Vietnamese (qwerty)

(All layouts with support for inputting chinese characters)

Use case

Type Chinese, Japanese, Korean, or Vietnamese

Describe alternatives you've considered

Additional context

Uranusek commented 5 months ago

You can create layouts yourself. You do it in a text file and add it in the keyboard settings, more precisely in the "Languages & Layouts" option.

You can also copy an existing layout and simply change its characters by doing everything from the keyboard settings.

https://github.com/Helium314/openboard/blob/new/layouts.md

mvevitsis commented 5 months ago

A layout is not good enough. It needs an input method editor to convert the inputted text into the correct ideographs, which is beyond the scope of regular prediction dictionaries.

For example, if I type

zhongguo for Chinese ちゅうごく for Japanese 중국 for Korean Trung Quốc for Vietnamese

I should be able to get 中国 or 中國 depending on the locale (han unification has made this slightly annoying)

Vietnamese is more a nice to have, I am actually not sure if there is an android keyboard with chu nom support, but for the other three languages this is a standard feature of any keyboard.

GrimPixel commented 4 months ago

Dictionary files can be found at fcitx5-table-extra or awesome-rime.

The focus on high customisability guarantees that not only Vietnamese, but also other writing systems like Sawndip and Khitan would be made possible through this keyboard program.

I am not familiar with the “Dictionary” feature of this program. Maybe that's where the solution is.

GrimPixel commented 4 months ago

To support CJKV+, here are necessary steps:

  1. Replace the last character of an underlined string with a new character and keep the string underlined (Jamo -> Hangul, Dakuten/Handakuten + Kana -> Dakuon/Handakuon Kana) https://github.com/Helium314/HeliBoard/issues/214
  2. Underline a string that includes a space (chữ Quốc ngữ -> chữ Hán Nôm) or use another character to indicate a space instead.
  3. Replace an underlined string with a new string from dictionary candidates (Pinyin/etc. -> Hanzi, Hangul/Romaja -> Hanja, Kana/Romaji -> Kanji, chữ Quốc ngữ -> chữ Hán Nôm)
PlexSheep commented 3 months ago

Also see #639 for Japanese

GrimPixel commented 1 month ago

I think https://github.com/stroke-input/stroke-input-android can do the job. It's safe to copy its code, as both share the same license.

o-data commented 1 week ago

Hi all. For Vietnamese there is usually 2 type of input that is popular. One is call VNI (Use Number) and the other call Telex.

Another user implement Telex method with this other open source Keyboard:

  1. https://github.com/florisboard/florisboard/issues?q=vietnamese
  2. florisboard/florisboard#2259
  3. florisboard/florisboard#183

The difference between the two is:

Telex use alphabet to create the "accent"/symbol/tone

For example adding: "s" will add the symbol '

as > á
os > ó

For VNI method it use Number (from 1 to 9 and 0) instead, all these number is allocate to a symbol, and pressing it will trigger that tone.

a1 > á
o1 > ó

You can read more about it here along with software and method to type it in Windows/Linux/macOS: https://yourvietnamese.com/learn-vietnamese/type-vietnamese/

UniKey (Windows software) is also Open Sources: https://www.unikey.org/en/

You can get the source code on his webpage: https://www.unikey.org/en/source.html

o-data commented 1 week ago

Hi @thanhhocse96

Can you also do a Pull Request for HeliBoard?