HTMLWindowEvents4::onkeyup Event

New for Internet Explorer 9

[This documentation is preliminary and is subject to change.]

Fires when the user releases a key.

Syntax

void onkeyup(
    IHTMLEventObj *pEvtObj
);

Parameters

Return Value

No return value.

Event DISPID

DISPID_HTMLWINDOWEVENTS4_ONKEYUP

The DISPID for this event is defined in mshtmdid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.

Event Information

Bubbles Yes
Cancels No
To invoke Release any keyboard key.
Default action Returns a number specifying the keyCode of the key that was released.

Event Object Properties

The IHTMLEventObj interface contains additional information about the current event. When the onkeyup event is fired, you can use the IHTMLWindow2::event property to retrieve an IHTMLEventObj interface. To obtain an alternate interface pointer such as IHTMLEventObj2 or IHTMLEventObj3, call QueryInterface on the object.

Available Properties

IDOMKeyboardEvent::key New for Internet Explorer 9  Gets the key identifier of a key that is pressed.
IHTMLEventObj::keyCode Sets or retrieves the Unicode key code associated with the key that caused the event.
IDOMKeyboardEvent::location New for Internet Explorer 9  Gets the location of a key on the keyboard or device.
IDOMKeyboardEvent::repeat New for Internet Explorer 9  Gets a value that indicates whether a key was pressed and held.

Refer to the specific event object for additional event properties.

Remarks

As of Microsoft Internet Explorer 4.0, the HTMLWindowEvents4::onkeyup event fires for the following keys:

  • Editing: DELETE, INSERT
  • Function: F1 - F12
  • Letters: A - Z (uppercase and lowercase)
  • Navigation: HOME, END, LEFT ARROW, RIGHT ARROW, UP ARROW, DOWN ARROW
  • Numerals: 0 - 9
  • Symbols: ! @ # $ % ^ & * ( ) _ - + = < [ ] { } , . / ? \ | ' ` " ~
  • System: ESC, SPACEBAR, SHIFT, TAB

As of Internet Explorer 5, the event also fires for the following keys:

  • Editing: BACKSPACE
  • Navigation: PAGE UP, PAGE DOWN
  • System: SHIFT+TAB

See Also

HTMLWindowEvents4::onkeydown, HTMLWindowEvents4::onkeypress