-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Korean keyboard won't type korean syllables #1398
Comments
Hello Andrey, in most language layouts we rely on unicode character composition, which I don't think is working here. However, I've recently moved towards candidate box suggestions / IME starting with the Chinese (Pinyin) keyboard. I think the best way to address your concerns is to move the Korean layout to this kind of input method. To accomplish this, I would need a detailed list of key candidates, such as this one: https://github.com/simple-keyboard/simple-keyboard-layouts/blob/master/src/lib/layouts/chinese.ts#L24 I will keep this task open as I look further into this. Regards, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi Francisco, Thank you for your reply. It's cool that the project is alive. The Korean language uses the alphabet and words are made of syllables. Luckily, there are fewer syllable constructions than in Chinese. It looks like this site has all possible Korean syllables combinations: Korean-syllables. Hopefully, this helps. Thank you for your hard efforts. |
Thanks for the information, I will look into this soon |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello Andrey, I have pushed updates to simple-keyboard and simple-keyboard-layouts to support Korean CandidateBox. To try it out, please upgrade to the following:
Demo: https://codesandbox.io/s/fragrant-dawn-1w9eh?file=/src/index.js Here's the layout that was changed: Note: There will probably be some issues, such as missing syllabes, redundant or wrong entries, among others. I cannot verify as I'm not a native Korean speaker, so I will rely on the community to modify the layout linked above and submit PRs as needed. Regards, |
I have published the update to react-simple-keyboard@3.4.38. You can get your React setup to work by following this example: Regards, |
Thank you very much, Francisco. |
@hodgef I wonder if korean keyboard is in unicode? With korean keyboard it shows correct syllables but it's not recognized by code. I investigated and found that same words typed from keyboard and typed from virtual keyboard have different character code. I think the problem is that currently words typed from virtual keyboard are considered as a sequence of letters like in English but korean syllables have separate code type. For example: In a word "신", ㅅ = U+3145, ㅣ= U+3163, ㄴ = U+3134, and 신=U+C2E0. In virtual keyboard may show syllables as U+3145/U+3163/U+3134 but it should be U+C2E0. So I wonder if it's possible to assign unicode to each syllable? If necessary I can make a list with each syllable assigned to corresponding unicode code. This character codes for a word from virtual keyboard(String length is 6 because it considers the word as a sequence of letters): This character codes for a word from real keyboard(String length is 2 because it considers the as a sequence of syllables): |
Actually the syllable code can be reliably calculated if we know all letters composing that syllable. So when a user clicks on that small window to make a syllable, the program can generate a syllable unicode code. https://en.wikipedia.org/wiki/Korean_language_and_computers#Hangul_in_Unicode |
Hello @hanuz06, Once you select a CandidateBox item, the item is decomposed like this:
This is helpful if you made a mistake, as it allows you to hit backspace and remove that last portion of the syllabe (triggering the CandidateBox) instead of deleting the whole syllabe and starting over. You can try out the various normalize functions to see their effect: In that page there's a box that you can use to run your code. Try entering this: const name1 = '신';
const name2 = '신';
console.log(`${name1}, ${name2}`, name1.length, name2.length);
console.log(name1 === name2);
console.log(name1.length === name2.length);
const name1NFC = name1.normalize('NFC');
const name2NFC = name2.normalize('NFC');
console.log(`${name1NFC}, ${name2NFC}`, name1NFC.length, name2NFC.length);
console.log(name1NFC === name2NFC);
console.log(name1NFC.length === name2NFC.length); Returns:
Regards, |
Thank you very much Francisco. normalize('NFC') works for korean syllables. |
Hi Francisco,
For example: it should be "워", but it always types as '우 ㅓ'. How can I fix the problem? Thank you in advance.
The text was updated successfully, but these errors were encountered: