Question
About Korean text Input handling
Hi guys~
I've an interesting question.
Back in TextField, Korean text insertion was handled by the Flash Player specific code.
So as TLF is appearing, how are you handling the Korean text editing which require multiple type sequence composition.
I mean a single Hangul(Korean) character may need multiple keycode eventually producting a korean character.
I've tried the IME capabilities, but no text composition is captured~
code is like this:
if (Capabilities.hasIME) {
IME.enabled = true;
try {
IME.conversionMode = IMEConversionMode.KOREAN;
trace(IME.enabled+" "+IME.conversionMode);
} catch (e:Error) {
trace("Unable to change IME.");
}
System.ime.addEventListener(IMEEvent.IME_COMPOSITION, IMECompHandler);
trace("listener registered!");
}
public function IMECompHandler(e:IMEEvent):void {
trace("composed text:"+e.text);
}
However Japanese IME is working.
Also i've tried to create a custom korean ime editor, The following problem is stopped me.
The problem:
When inserting korean text, i have 2 listener. first one is on KEY_DOWN and last one is on KEY_UP.
on KEY_DOWN, charCode is always 0 and keyCode is always 229.
on KEY_UP, charCode and keyCode is same as entering Roman text. (like entering "a" results in charCode 97, keyCode 65).
As a result, i can catch what keyboard key was typed only when a KEY_UP events is fired.
It makes it impossible to know what keys were typed during continious pressing a single key. Finally there's no way to create a custom IME unless any magic.
I've tried also new TLF based TLFTextField, it seems like text editing is not implemented yet.
So my question again is that if TLF is a pure Actionscript code based on FTE(flash text engine) which have no capability of editing or inserting text, how do you handle Korean text while IME is not helpful~ ?
I've an interesting question.
Back in TextField, Korean text insertion was handled by the Flash Player specific code.
So as TLF is appearing, how are you handling the Korean text editing which require multiple type sequence composition.
I mean a single Hangul(Korean) character may need multiple keycode eventually producting a korean character.
I've tried the IME capabilities, but no text composition is captured~
code is like this:
if (Capabilities.hasIME) {
IME.enabled = true;
try {
IME.conversionMode = IMEConversionMode.KOREAN;
trace(IME.enabled+" "+IME.conversionMode);
} catch (e:Error) {
trace("Unable to change IME.");
}
System.ime.addEventListener(IMEEvent.IME_COMPOSITION, IMECompHandler);
trace("listener registered!");
}
public function IMECompHandler(e:IMEEvent):void {
trace("composed text:"+e.text);
}
However Japanese IME is working.
Also i've tried to create a custom korean ime editor, The following problem is stopped me.
The problem:
When inserting korean text, i have 2 listener. first one is on KEY_DOWN and last one is on KEY_UP.
on KEY_DOWN, charCode is always 0 and keyCode is always 229.
on KEY_UP, charCode and keyCode is same as entering Roman text. (like entering "a" results in charCode 97, keyCode 65).
As a result, i can catch what keyboard key was typed only when a KEY_UP events is fired.
It makes it impossible to know what keys were typed during continious pressing a single key. Finally there's no way to create a custom IME unless any magic.
I've tried also new TLF based TLFTextField, it seems like text editing is not implemented yet.
So my question again is that if TLF is a pure Actionscript code based on FTE(flash text engine) which have no capability of editing or inserting text, how do you handle Korean text while IME is not helpful~ ?
