Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
CHARMSG (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WININPUT
struct _CHARMSG {
USHORT chr; /* mp2 */
USHORT vkey;
USHORT fs; /* mp1 */
UCHAR cRepeat;
UCHAR scancode;
};
The CHARMSG structure is used by the CHARMSG macro to access key information
that is passed in the parameters of the WM_CHAR message. Unlike other MS
OS/2 structures, this structure is not defined as a type.
Field Description
────────────────────────────────────────────────────────────────────────────
chr Specifies the ASCII character.
vkey Specifies the virtual key code.
fs Specifies the keyboard control codes. This field can be one or
more of the following values:
Value Meaning
──────────────────────────────────────────────────────────────────
KC_CHAR The usChr value is valid; otherwise, mp2 contains
zero.
KC_SCANCODE The uchScanCode value is valid; otherwise,
uchScanCode contains zero.
KC_VIRTUALKEY The usVKey value is valid; otherwise, usVKey
contains 0.
KC_KEYUP The event was a key-up transition; otherwise, it
was a key-down transition.
KC_PREVDOWN The key was previously down; otherwise, it was
previously up.
KC_DEADKEY The character code is a dead key. The application
must display the glyph for the dead key without
advancing the cursor.
KC_COMPOSITE The character code is formed by combining the
current key with the previous dead key.
KC_INVALIDCOMP The character code is not a valid combination with
the preceding dead key. The application must
advance the cursor past the dead-key glyph and
then, if the current character is not a space, the
application beeps the speaker and displays the new
character code.
KC_LONEKEY This bit is set if the key was pressed and
released with no other keys being pressed or
released between the time the key was pressed and
the time it was released.
KC_SHIFT The shift state was active when the key was
pressed or released.
KC_ALT The ALT state was active when the key was pressed
or released.
KC_CTRL The CONTROL state was active when the key was
pressed or released.
cRepeat Specifies the key repeat count.
scancode Specifies the character scan code.
See Also
WM_CHAR, CHARMSG
♦