Windows Media Player Control SDK Banner Art
*Contents *Index  *Topic Contents
*Previous Topic: Error
*Next Topic: KeyPress

KeyDown Event

Occurs when the user presses a key.

Syntax

JScript
<SCRIPT FOR="MediaPlayer" EVENT="KeyDown(iKeyCode, iShiftState)" LANGUAGE="JScript">
    //insert script commands//
</SCRIPT>
VBScript
<SCRIPT LANGUAGE="VBScript">
Sub MediaPlayer_KeyDown(iKeyCode, iShiftState)
    //insert script commands//
End Sub
</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 SendKeyboardEvents property is true, this event occurs when the Microsoft Windows Media™ Player control has focus and the user presses a key. If SendKeyboardEvents is false, this event does not occur.

See Also

KeyUp, KeyPress, SendKeyboardEvents, Capturing Keyboard and Mouse Events


Top of Page Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.