Message::KeyDown

This message is posted to the window with the input focus when a non-system key is depressed.

Parameters

Parameter1

The virtual key code.

Parameter2

Key stroke flags.

Bits 0-15 The typematic repeat count for the key.
Bits 16-23 Hardware dependent scan code for the key.
Bit 24 Extended key flag.
Bits 25-28 Reserved.
Bit 29 Context code. This bit is set if the alt key was depressed and clear otherwise. For this message, this bit is zero.
Bit 30 Previous key state. This bit is set if the key was depressed prior to the message being sent and clear otherwise.
Bit 31 Transition state. This bit is clear if the key is being depressed and set if it is being released. For this message, this bit is zero.

Return

Handle

If the window processes this message, it should return zero.

Notes

A non-system key is a key that is pressed without the alt key being depressed.

The previous state bit (bit 30) may be used to determine if this is the first key down message to be received. Multiple key down messages can be sent because of typematic repeat.

The extended keys (bit 24) are:

When the F10 key is pressed, the default window procedure sets an internal flag such that when the next key up message is received, the message Message::SystemCommand is generated and sent to the top-level window.