Confirmed users, Bureaucrats and Sysops emeriti
1,680
edits
Line 19: | Line 19: | ||
When 'compositionInProgress' there is not necessarily an input method window open. For example, consider the last key press for a composition which is typically the "enter" key. The sequence of events resulting from that physical key press might be: | When 'compositionInProgress' there is not necessarily an input method window open. For example, consider the last key press for a composition which is typically the "enter" key. The sequence of events resulting from that physical key press might be: | ||
<ol> | |||
<li> Input method window closes.</li> | |||
<li> Plugin receives 'NPCocoaEventKeyDown' event for enter key with 'compositionInProgress' set to true.</li> | |||
<li> Plugin receives 'NPCocoaEventTextInput' for completed composition.</li> | |||
<li> Plugin receives 'NPCocoaEventKeyUp' event for enter key with 'compositionInProgress' set to false.</li> | |||
</ol> | |||
Another situation might be one in which returning "kNPEventStartIME" for a 'NPCocoaEventKeyDown' event does not open an input method window. In this case the sequence of events would look like: | Another situation might be one in which returning "kNPEventStartIME" for a 'NPCocoaEventKeyDown' event does not open an input method window. In this case the sequence of events would look like: | ||
<ol> | |||
<li> Plugin receives 'NPCocoaEventKeyDown' event for 'g' key with 'compositionInProgress' set to true.</li> | |||
<li> Plugin receives 'NPCocoaEventTextInput' for completed composition, the string "g".</li> | |||
</ol> |