Javascript Reference
Categories: event

javascript event initKeyEvent( )

@April 15, 2008, 7:28 p.m.
initKeyEvent( ) Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM n/a

initKeyEvent("eventType", bubblesFlag, cancelableFlag, view, ctrlKeyFlag, altKeyFlag, shiftKeyFlag, metaKeyFlag, keyCode, charCode)

 

Initializes a newly created event object with a complete set of property values associated with any keyboard event. This method's name and parameter makeup may change for the formal DOM Level 3 events module, where keyboard events (tentatively called text events) will be published. All parameters must be present, and must be set to default values (such as false for Boolean key flags or zero for integer code numbers) if the values are not significant for the event type.

 
Parameters
 
  • String identifier for the event's type: keydown, keypress, keyup.
  • Boolean value (true | false) determining whether the event's default propagation behavior is to bubble.
  • Boolean value (true | false) determining whether the event's default action may be prevented via the preventDefault( ) method.
  • Reference to the window or frame object in which the dynamically-generated event is supposed to have occurred.
  • Boolean value (true | false) of the Control key state for this event.
  • Boolean value (true | false) of the Alt key state for this event.
  • Boolean value (true | false) of the Shift key state for this event.
  • Boolean value (true | false) of the Meta key(e.g., Macintosh Command key) state for this event.
  • Integer key code for this event.
  • Integer character code for this event.
 
Returned Value

None.


Powered by Linode.