NPAPI:CocoaEventModel: Difference between revisions

Jump to navigation Jump to search
Line 140: Line 140:
Keyboard events will only be fired when the plug-in has keyboard focus.
Keyboard events will only be fired when the plug-in has keyboard focus.


NPCocoaEventKeyDown - Fired when a key is pressed
* NPCocoaEventKeyDown - Fired when a key is pressed
NPCocoaEventKeyUp - Fired when a key is released
* NPCocoaEventKeyUp - Fired when a key is released
NPCocoaEventFlagsChanged - Fired when a modifier key is pressed or released
* NPCocoaEventFlagsChanged - Fired when a modifier key is pressed or released
 
NPNSString *characters;


NPNSString *characters;
The characters associated with the key-up or key-down event. Will always be null for NPCocoaEventFlagsChanged.
The characters associated with the key-up or key-down event. Will always be null for NPCocoaEventFlagsChanged.


NPNSString *charactersIgnoringModifiers;
NPNSString *charactersIgnoringModifiers;
 
The characters generated by the receiving key event as if no modifier key (except for Shift) applies. Will always be null for NPCocoaEventFlagsChanged.
The characters generated by the receiving key event as if no modifier key (except for Shift) applies. Will always be null for NPCocoaEventFlagsChanged.


NPBool isARepeat;
NPBool isARepeat;
 
TRUE if the key event is a repeat caused by the user holding the key down, FALSE if the key event is new. Will always be FALSE for NPCocoaEventFlagsChanged.
TRUE if the key event is a repeat caused by the user holding the key down, FALSE if the key event is new. Will always be FALSE for NPCocoaEventFlagsChanged.


uint16 keyCode;
uint16 keyCode;
 
The virtual key code for the keyboard key associated with the key event.
The virtual key code for the keyboard key associated with the key event.


Confirmed users, Bureaucrats and Sysops emeriti
1,680

edits

Navigation menu