<AWT Dev> [8] Review request for 7156194 [macosx] Can't type non-ASCII characters into applets

Dmitry Cherepanov dmitry.cherepanov at oracle.com
Thu Apr 5 00:47:37 PDT 2012


Hi Anthony,

Anthony Petrov wrote:
> Hi Dmitry,
>
> The fix looks good to me. One question though:

Thanks for reviewing this!

>
> src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java
>>  188             while (index < length) {
>>  189                 c = text.charAt(index);
>>  190                 peer.dispatchKeyEvent(KeyEvent.KEY_TYPED,
>>  191                                       System.currentTimeMillis(),
>>  192                                       0, KeyEvent.VK_UNDEFINED, c,
>>  193                                       
>> KeyEvent.KEY_LOCATION_UNKNOWN);
>>  194                 index++;
>>  195             }
>
> Are we sure we want to dispatch each character for the 
> handleInputEvent(String) event with its own timestamp? Does a browser 
> combine several unrelated key strokes into a single InputEvent, or are 
> all the characters actually represent one integral input event? Put 
> another way, should user code be able to see that a bunch of TYPED 
> events actually belongs to one native input event?

I'm not sure that I understood your question correctly. When a browser 
starts a complex text composition, the Plug-in doesn't receive 
KeyDown/KeyUp events but it receives TextInput event containing the 
composed string and this TextInput event is sent when the composition is 
finished. If this doesn't answer your question, could you please give an 
example?

Thanks,
Dmitry




More information about the awt-dev mailing list