filipst / hackerskeyboard

Automatically exported from code.google.com/p/hackerskeyboard
0 stars 0 forks source link

Support Korean Hangul keyboard? #155

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to support a Korean keyboard, cf. 
http://en.wikipedia.org/wiki/Keyboard_layout#Hangul_.28for_Korean.29

However, my initial experiments towards this were not successful. I was hoping 
that it would be enough if the keyboard sends Unicode Jamo sequences, and that 
the Android text compositing engine would then combine them into Hangul, for 
example (assuming I got this copied right):

  Input: ㅈ ㅗ (U+110c U+1169)
  Output: 조 (U+c870)

However, this doesn't seem to happen automatically, and I get the impression 
that the input method would need to do the composition internally before 
sending characters to the application receiving input.

See for example this source file from the HangulKeyboard application which does 
this: 
http://code.google.com/p/hangulkeyboard/source/browse/trunk/HangulKeyboard/src/o
rg/kandroid/app/hangulkeyboard/SoftKeyboard.java

Overall, this appears to be more complicated than I'm willing to take on at the 
moment, especially since I don't understand the algorithm involved.

Original issue reported on code.google.com by Klaus.We...@gmail.com on 13 Jan 2012 at 1:00

GoogleCodeExporter commented 9 years ago
Attached explanation of the Unicode Hangul encoding/decoding by Seokju Lee. 
It's doable, but a lot more work than a plain language keymap since it requires 
significant code changes to work.

One tricky bit is making sure that backspace and other editing keys work sanely 
when used within half-constructed characters, and to provide appropriate 
feedback while typing. What's the usual behavior in this respect?

For example, I assume backspace normally deletes the previous Hangul character. 
If the Hangul character isn't fully constructed yet, is it supposed to delete 
just one Jamu?

And what if using arrow keys to move the cursor away from an incomplete 
character? Do users expect to be able to continue building the partial 
character when moving back to it?

Lastly, are there cases where people will want to type standalone Jamu that 
should not be combined into Hangul? How would that normally work?

Original comment by Klaus.We...@gmail.com on 17 Jan 2012 at 5:35

Attachments:

GoogleCodeExporter commented 9 years ago
A few questions about the chart:

- is it correct to assume that the jungsung and jongsung are distinct sets with 
no overlap? In other words, can it reliably tell that the word is done when 
getting a jongsung key as the second key?

- There's an "X" in the jongsung table at position 0. Is that something that 
users will actually type, or does it indicate an unused code?

- Is it good enough to use the current "swipe space bar" language switch when 
mixing Korean and English, or would users expect a way to switch within the 
Korean layout? That would be difficult.

Original comment by Klaus.We...@gmail.com on 17 Jan 2012 at 5:48

GoogleCodeExporter commented 9 years ago
Issue 173 has been merged into this issue.

Original comment by Klaus.We...@gmail.com on 21 Jan 2012 at 4:54

GoogleCodeExporter commented 9 years ago
- is it correct to assume that the jungsung and jongsung are distinct sets with 
no overlap? In other words, can it reliably tell that the word is done when 
getting a jongsung key as the second key?

: I can't understand exactly..
Jungsung and Jongsung are distinct sets with no overlap? yes.
Chosung or Jungsung is done when getting a Jongsung key as the second key.
And Chosung, Jungsung and Jongsung always can be typed alone.

Original comment by totop1230@gmail.com on 21 Jan 2012 at 6:29

Attachments:

GoogleCodeExporter commented 9 years ago
I wonder if there's any progress here?
Switching keyboards all the time is rather annoying. Having hangul support 
would be just wonderful.

Original comment by con...@gmail.com on 8 Oct 2012 at 3:20

GoogleCodeExporter commented 9 years ago
Issue 326 has been merged into this issue.

Original comment by Klaus.We...@gmail.com on 22 Jan 2013 at 7:17

GoogleCodeExporter commented 9 years ago
Some feedback to questions from the comment #1:

> For example, I assume backspace normally deletes the previous Hangul 
character. If
> the Hangul character isn't fully constructed yet, is it supposed to delete 
just
> one Jamu?

Yes.  It should delete the last jamo.  This should happen even if the character 
seems complete (i.e. it couldn't be extended any more) but its construction 
hasn't yet finished.

Example, typing the word "앉다":
1. ㅇ, ㅏ, ㄴ, ㅈ (I see "앉", yet I'm still in the "construction mode")
2. Pressing backspace results in "안".
3. ㅈ again results in "앉"
4. ㄷ finishes the first character and begins construction of the following.
5. ㅏ results in "앉다"
6. Typing a period, a space, a newline or anything non-hangul finishes the 
character.
7. Pressing backspace twice now deletes the whole word.

> And what if using arrow keys to move the cursor away from an incomplete 
character?
> Do users expect to be able to continue building the partial character when 
moving
> back to it?

Arrow keys exit the construction mode and users don't expect to resume it when 
they get back to the same position.

> Lastly, are there cases where people will want to type standalone Jamu that 
should
> not be combined into Hangul? How would that normally work?

Yes, standalone jamos are also common, especially in "internet speech".
You can either exit the construction mode by pressing an arrow key or a space 
or any other common means, or type jamos that cannot be combined in the current 
situations.  Typical "ㅎㅎ" or "ㅋㅋ" are typed just by pressing the 
respective jamo twice.

I hope this helps.

I'd also suggest installing one of the many Korean IMEs available in Play Store 
and trying it out yourself.

Original comment by con...@gmail.com on 22 Jan 2013 at 7:57

GoogleCodeExporter commented 9 years ago
Hi,

I found some codes helping to support Korean.

engToKor function of attached file changes English string that is typed with 
qwerty keyboard into Korean string.

I think that you can use like this,

1. Collect English string into buffer when new key code comes, 
2. Change to Korean string with engToKor function.
3. Compare this converted string with previous converted string.
4. Erase difference characters using backspace, input difference characters.

Buffer empty when,
1. Cursor position is changed.
2. Language of keyboard is changed.
3. Punctuation marks like period, space are inputted.

Please let me know if you have a question.

Original comment by sportica...@gmail.com on 19 Aug 2014 at 6:51

Attachments: