Partager via


IWMPEvents::KeyDown (Windows Embedded CE 6.0)

1/6/2010

The KeyDown event occurs when a key is pressed.

Syntax

void KeyDown( short nKeyCode, short nShiftState ); 

Parameters

  • nKeyCode
    [in]  Specifies which physical key is pressed. For possible values, see the Remarks section.
  • nShiftState
    [in]  A bit field with the least significant 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. The shift argument indicates the state of these keys. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.

Return Values

This event does not return a value.

Remarks

The nKeyCode argument specifies a physical key. The following tables show the possible values for the major keys on a standard keyboard.

Values for the main keys.

Key Value

A-Z

65-90

0-9

48-56

F1-F12

112-123

ESC

27

TAB

9

CAPS LOCK

20

SHIFT (left or right)

16

CTRL (left or right)

17

ALT (left or right)

18

SPACE

32

BACKSPACE

8

ENTER

13

Windows logo key, left

91

Windows logo key, right

92

Application key

93

Values for the number pad keys.

Key Value

0-9

96-105

NUM LOCK

144

DIVIDE (/)

111

MULTIPLY (*)

106

SUBTRACT (-)

109

ADD (+)

107

SEPARATOR (Enter)

108

DECIMAL (.)

110

Values for the navigation keys.

Key Value

INSERT

45

DELETE

46

HOME

36

END

35

PAGE UP

33

PAGE DOWN

34

UP ARROW

38

DOWN ARROW

40

LEFT ARROW

37

RIGHT ARROW

39

See Also

Reference

IWMPEvents Interface