Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This event occurs when the user presses a key.

Compatibility:Windows Media Player, ActiveMovie

Syntax

<SCRIPT FOR="MediaPlayer" EVENT="KeyDown(
iKeyCode, 
iShiftState)" LANGUAGE="JScript">
  //insert script commands//
</SCRIPT>

Parameters

iKeyCode

Integer value specifying a key code, such as vbKeyF1 (the F1 key) or vbKeyHome (the HOME key).

To specify key codes, see the Microsoft® Visual Basic® documentation.

iShiftState

Integer value specifying a bit field with bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2).

These bits correspond to the values 1, 2, and 4, respectively.

Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.

Remarks

If the value of the SendKeyboardEventsproperty is true, this event occurs when the Windows Media Player control has focus and the user presses a key.

If SendKeyboardEventsis false, this event does not occur.

ActiveMovie compatibility mode is only supported through Windows CE .NET 4.1.

Requirements

Windows Embedded CE Windows CE 3.0 and later

See Also