KBDINFO

From EDM2
Jump to: navigation, search

Keyboard status data structure.

Type

USHORT  cb
USHORT  fsMask
USHORT  chTurnAround
USHORT  fsInterim
USHORT  fsState

C Declaration Method

typedef struct

Fields

cb
Length, in bytes, of this data structure.
10 - Only valid value.
fsMask
State mask.
The system state altered by this call. If bits 0 and 1 are off, the echo state of the system is not altered. If bits 2 and 3 are off, the binary and ASCII state of the system is not altered. If bits 0 and 1 are on, or if bits 2 and 3 are on, the function returns an error. If binary mode is set, echo is ignored.
Bits 15-9 - Reserved.
Bit 8 - Shift return is on.
Bit 7 - Length of the turn-around character (meaningful only if bit 6 is on).
Bit 6 - Turn-around character is modified.
Bit 5 - Interim character flags are modified.
Bit 4 - Shift state is modified.
Bit 3 - ASCII mode is on.
Bit 2 - Binary mode is on.
Bit 1 - Echo off.
Bit 0 - Echo on.
chTurnAround
Turnaround character.
Definition of the turn-around character. In ASCII and extended ASCII format, the turn-around character is defined as the carriage return. In ASCII format only, the turn-around character is defined in the low-order byte.
fsInterim
Interim character state and NLS shift state.
Bits 15-8 NLS shift state.
The meaning of the NLS shift varies by language. The following bits are defined to access this data:
NLSS_NLS1 (0x01) - Fullwidth, National layer
NLSS_NLS2 (0x02) - Katakana, JAMO phonetic
NLSS_NLS3 (0x04) - Hiragana, Hangeul, TsangJye
NLSS_APPL (0x10) - Application bit
NLSS_NLS4 (0x40) - Romanji, HanjaCsr
NLSS_KANJI (0x80) - Kanji, Hanji
Bit 7 - Interim character flag is on.
Bit 6 - Reserved.
Bit 5 - Application requested immediate conversion.
Bits 4-0 - Reserved.
fsState
Current shift state.
Bit 15 - SysReq key down.
Bit 14 - CapsLock key down.
Bit 13 - NumLock key down.
Bit 12 - ScrollLock key down.
Bit 11 - Right Alt key down.
Bit 10 - Right Ctrl key down.
Bit 9 - Left Alt key down.
Bit 8 - Left Ctrl key down.
Bit 7 - Insert on.
Bit 6 - CapsLock on.
Bit 5 - NumLock on.
Bit 4 - ScrollLock on.
Bit 3 - Either Alt key down.
Bit 2 - Either Ctrl key down.
Bit 1 - Left Shift key down.
Bit 0 - Right Shift key down.