NPAPI:CocoaEventModel: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 5: Line 5:
== Contributors ==
== Contributors ==


* Last modified: October 15, 2010
* Last modified: January 18, 2011
* Authors: Anders Carlsson (Apple)
* Authors: Anders Carlsson (Apple)
* Contributors: Josh Aas (Mozilla Corporation)
* Contributors: Josh Aas (Mozilla Corporation)
Line 211: Line 211:
The input method may open an out-of-line input window where complex text can be composed. When the user confirms the text and dismisses the window, an NPCocoaEventTextInput event is sent with the relevant unicode string.
The input method may open an out-of-line input window where complex text can be composed. When the user confirms the text and dismisses the window, an NPCocoaEventTextInput event is sent with the relevant unicode string.


During complex text input the browser will continue to send regular key events. So long as the plugin still wants complex text input (which may result in a NPCocoaEventTextInput event being sent) it should continue to return kNPEventStartIME for NPCocoaEventKeyDown. If a plugin returns anything other than kNPEventStartIME for NPCocoaEventKeyDown then complex text input will be canceled.
No <code>NPCocoaEventKeyDown</code> or <code>NPCocoaEventKeyUp</code> events will be sent to the plugin during composition. <code>NPCocoaEventFlagsChanged</code> events will still be sent. Browser implementers should be mindful of the edge case where a key down ends composition (for example, the return key when an input window is in use) - the subsequent key up event is considered to be associated with the composition and should not be sent to the plugin.
 
Due to an [[NPAPI:CocoaCompositionClarification|amended specification]] and inconsistency in original implementations the variable <code>NPNVsupportsUpdatedCocoaInput</code> (bool, NPNVariable = 3002) will indicate whether a browser supports this updated specification or not. If this is not defined and true then text input behavior will vary between browsers.  


== Notes ==
== Notes ==
Confirmed users, Bureaucrats and Sysops emeriti
1,680

edits

Navigation menu