IHTMLEventObj::get_keyCodeIHTMLEventObj::get_keyCode*
*Contents  *Index  *Topic Contents
*Previous Topic: IHTMLEventObj::put_keyCode
*Next Topic: IHTMLEventObj::get_button

IHTMLEventObj::get_keyCode


HRESULT get_keyCode(
    long *p
);

Retrieves the Unicode key code associated with the key that caused the event.

p
Address of a long integer variable that receives the Unicode key code. It can be any key code in the range 1 to 255. It is zero if no key caused the event.

If you set this property, the given key code replaces the existing value. Subsequent event handlers receive the new value rather than the original.

This property is intended to be used with the onkeydown, onkeyup, and onkeypress events.

See also put_keyCode

Up Top of Page


IHTMLEventObj::put_keyCode


HRESULT put_keyCode(
    long v
);

Sets the Unicode key code associated with the key that caused the event.

v
Long integer value specifying any Unicode key code in the range 1 to 255. It is zero if no key caused the event.

If you set this property, the given key code replaces the existing value. Subsequent event handlers receive the new value rather than the original.

This property is intended to be used with the onkeydown, onkeyup, and onkeypress events.

See also get_keyCode


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.