Closed Bug 491819 Opened 15 years ago Closed 14 years ago

No difference detectable between regular and IME key events

Categories

(Firefox :: General, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: daniel.danilatos, Unassigned)

References

()

Details

(Keywords: inputmethod, Whiteboard: [CLOSEME 2010-12-01])

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.8) Gecko/2009032712 Ubuntu/8.04 (hardy) Firefox/3.0.8



Iit would be great if it were possible to distinguish an IME input event from a regular key event - Webkit & IE specify the special value 229 for the key code, which is actually very useful. Doesn't matter how it's done, but some way to distinguish would be great.

For example, being able to distinguish:
* Pressing "w" to enter the character w, -vs- pressing it as the start of the chinese word "wo"
* Pressing SPACE to enter a regular space character -vs- pressing it to "commit" a character, resulting in no such space inserted
* Pressing BACKSPACE to delete a character -vs- pressing it to select the previous choice in the IME menu
* Arrow keys - same deal, navigatin vs selecting IME menu choices

This is possible in the other browsers. What is not detectable (other than with mutation events) in other browsers is if an IME menu option is selected with the mouse. Support for that would be great as well.

I am also very interested in general to get better, reliable IME support - this is something that should be part of HTML 5. Currently writing a rich text editor is riddled with problems when dealing with IME input, due to a severe lack of events and any control over what is going on.

Reproducible: Always

Steps to Reproduce:
Please use FF3.0, as FF3.5, and the latest version of 3.6 are even worse and won't be able to demonstrate this problem properly, filed as bug 491816
1. Go to the demo URL http://www.danilatos.com/event-test/ExperimentTest.html
2. Select some form of Chinese input (I used ITABC)
3. Type into the contentEditable div in the top left (starts with the text "Hello")
4. Observe the event log. Click on event entries to see more information.
5. Switch back to english and repeat
Actual Results:  
There is no way to tell the difference between "regular" and "IME" key events on the keydown event. The IME events will lack a keypress, but by then it's too late to deal with - the next event we get is a dom mutation event, so we can't know in advance.

Expected Results:  
Some way of being able to tell that a key event is IME before the dom mutates.
This sounds relatively easy... Masayuki, can you do this?
I don't think that we should fire key events during composition. See bug 354358.
I guess that you want to know the timing of updating the IME composition string. If so, this is dup of bug 354358.

I think that the composition string may be updated without keyboards, e.g., the inputting trigger might be sound inputting device. And also some IME frameworks may eat the key events during composition. But the IME composition string updating can be handled all situations.

Therefore, DOM3 or HTML5 should define a new event which is IME composition string updating event. I believe that the way is better.
Reporter, please retest with Firefox 3.6.12 or later in a fresh profile (http://support.mozilla.com/kb/Managing+profiles). Also update your plugins (flash, adobe reader, java, quicktime, silverlight, etc.) Go to the developer's website and download the latest version from there. If you no longer see this issue, please close this bug as RESOLVED, WORKSFORME. If you do see the bug, please post a comment.
Whiteboard: [CLOSEME 2010-12-01]
No reply, INCOMPLETE. Please retest with Firefox 3.6.12 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.