Last Comment Bug 865564 - [UIEvents-key] Map Hangul related keys to KeyboardEvent.key value
: [UIEvents-key] Map Hangul related keys to KeyboardEvent.key value
Status: NEW
: inputmethod, intl
Product: Core
Classification: Components
Component: Widget: Gtk (show other bugs)
: Trunk
: x86_64 Linux
-- normal (vote)
: ---
Assigned To: Masayuki Nakano [:masayuki]
Depends on: 842927
Blocks: 680830
  Show dependency treegraph
Reported: 2013-04-24 22:34 PDT by Masayuki Nakano [:masayuki]
Modified: 2016-07-05 18:31 PDT (History)
3 users (show)
masayuki: needinfo? (jshin1987)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Masayuki Nakano [:masayuki] 2013-04-24 22:34:56 PDT
At the initial implementation of D3E KeyboardEvent.key, following Hangul related keys are mapped to "Unidentified". They should be mapped correctly as far as possible (I don't familiar with Korean language, though).

Comment 1 User image Masayuki Nakano [:masayuki] 2013-05-15 22:35:13 PDT
I'm not familiar with Hangul IME, so, I'm not sure the actual meaning of the keysyms.

With Korean keyboard, I can see only two additional keys which cause only GDK_Hangul and GDK_Hangul_Hanja with any modifier state.

However, I found this document, see Figure 8:

Name                       Code    Note
----                       ----    ----
Hangul                     0x31    Hangul start/stop(toggle) 
Hangul Start               0x32    Hangul start 
Hangul End                 0x33    Hangul end, English start 
Hangul Hanja               0x34    Start Hangul->Hanja Conversion 
Hangul Jamo                0x35    Hangul Jamo mode 
Hangul Romaja              0x36    Hangul Romaja mode 
Hangul Code Input          0x37    Hangul code input mode 
Hangul Jeonja              0x38    Jeonja mode 
Hangul Banja               0x39    Banja mode 
Hangul Pre-Hanja           0x3A    Pre Hanja conversion 
Hangul Post-Hanja          0x3B    Post Hanja conversion 
Hangul Single Candidate    0x3C    Single candidate 
Hangul Multiple Candidate  0x3D    Multiple candidate 
Hangul Previous Candidate  0x3E    Previous candidate 
Hangul Special             0x3F    Special symbols 

I'll map the keysyms as far as possible with this hint.
Comment 2 User image Masayuki Nakano [:masayuki] 2013-05-16 05:06:47 PDT
I searched about "Jamo", "Romaja", "Jeonja", "Banja" and "Junja".

According to this topic of wikipedia

GDK_Romaja should be mapped to "Alphanumeric" rather than "RomanCharacters".

However, I don't find the meaning of other words.

channy: Could you explain about the meaning of above words?

We need to map the keysyms in comment #0 to the keynames which are defined by DOM Level 3 Events (only if proper keyname is defined for a keysym)

I'm thinking about the mapping is:

GDK_Hangul                    "HangulMode"
GDK_Hangul_Start              "HangulMode"
GDK_Hangul_End                "Alphanumeric"
GDK_Hangul_Hanja              "HanjaMode"              
GDK_Hangul_Jamo               (not sure)
GDK_Hangul_Romaja             "Alphanumeric"
GDK_Hangul_Jeonja             (not sure)
GDK_Hangul_Banja              (not sure)
GDK_Hangul_PreHanja           "PreviousCandidate"
GDK_Hangul_PostHanja          "NextCandidate"

Note that the left key of space key causes GDK_Hangul. The right key of space key causes GDK_Hangul_Hanja. I've not found the keys which cause other keysyms on the standard Korean keyboard.

Other possible DOM Level 3 Events defined keynames are:

'FinalMode: The Final Mode (Final) key used on some Asian keyboards, to enable the final mode for IMEs.
'RomanCharacters': The Roman Characters function key, also known as the 'Youngja' or 'Young' key.
'JunjaMode': The Junja (Korean characters) Mode key.
Comment 3 User image Channy Yun [:channy] 2013-05-16 08:11:48 PDT
I changed to get help from Jungshik.
Comment 4 User image Masayuki Nakano [:masayuki] 2013-05-20 10:54:32 PDT
I found this document:

Junja mode means "Single-byte Latin letters" mode.

Banja mode means "Double byte Latin letters" mode.

Then, it seems that GDK_Hangul_End and GDK_Hangul_Romaja should be mapped to "JunjaMode".
Comment 5 User image Masayuki Nakano [:masayuki] 2013-05-26 21:44:16 PDT

We've not gotten the reply from Jungshik, and my question isn't technical question. I just want to know the equivalent between GDK keysyms and D3E key names of Korean IME input modes. Don't you have no advice for me?

I'm thinking current mapping should be:

GDK_Hangul                    "HangulMode"
GDK_Hangul_Start              "HangulMode"
GDK_Hangul_End                "JunjaMode"
GDK_Hangul_Hanja              "HanjaMode"              
GDK_Hangul_Jamo               (not sure)
GDK_Hangul_Romaja             "JunjaMode"
GDK_Hangul_Jeonja             (not sure)
GDK_Hangul_Banja              "Unidentified" (We should request to add new key name to W3C)
GDK_Hangul_PreHanja           "PreviousCandidate"
GDK_Hangul_PostHanja          "NextCandidate"
Comment 6 User image Masayuki Nakano [:masayuki] 2013-05-26 22:25:51 PDT
Er, perhaps, GDK_Hangul_Jamo should be HangulMode.

Note You need to log in before you can comment on or make changes to this bug.