Difference between revisions of "KbdGetStatus"
From EDM2
(Created page with "==Description== Returns information about the keyboard. ==Syntax== <PRE> #define INCL_KBD #include <os2.h> PKBDINFO pkbdinfo; →Pointer to keyboard data.: HKBD ...") |
m |
||
Line 12: | Line 12: | ||
rc = KbdGetStatus(pkbdinfo, hkbd); | rc = KbdGetStatus(pkbdinfo, hkbd); | ||
+ | </PRE> | ||
− | |||
==Parameters== | ==Parameters== | ||
; pkbdinfo (PKBDINFO) - output : Pointer to keyboard data. | ; pkbdinfo (PKBDINFO) - output : Pointer to keyboard data. | ||
− | A pointer to a KBDKEYINFO structure in which the keyboard status is returned. | + | A pointer to a KBDKEYINFO structure in which the keyboard status is returned. |
+ | ; hkbd (HKBD) - input : Reserved. Must be 0. | ||
− | |||
==Return Code== | ==Return Code== | ||
rc (APIRET) - returns | rc (APIRET) - returns | ||
− | |||
KbdGetStatus returns one of the following values: | KbdGetStatus returns one of the following values: | ||
+ | * 0 NO_ERROR | ||
+ | * 373 ERROR_KBD_PARAMETER | ||
+ | * 376 ERROR_KBD_INVALID_LENGTH | ||
+ | * 439 ERROR_KBD_INVALID_HANDLE | ||
+ | * 445 ERROR_KBD_FOCUS_REQUIRED | ||
+ | * 447 ERROR_KBD_KEYBOARD_BUSY | ||
+ | * 504 ERROR_KBD_EXTENDED_SG | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Remarks== | ==Remarks== | ||
Some of the keyboard status information can be changed using KbdSetStatus. | Some of the keyboard status information can be changed using KbdSetStatus. | ||
In KBDINFO, the upper byte of fsInterim is the NLS shift state. The meaning of the NLS shift varies by language. The following bits are defined to access this data: | In KBDINFO, the upper byte of fsInterim is the NLS shift state. The meaning of the NLS shift varies by language. The following bits are defined to access this data: | ||
− | + | NLSS_NLS1 (0x01) - Full-width, National layer | |
− | NLSS_NLS1 (0x01) - Full-width, National layer | + | NLSS_NLS2 (0x02) - Katakana, JAMO phonetic |
− | NLSS_NLS2 (0x02) - Katakana, JAMO phonetic | + | NLSS_NLS3 (0x04) - Hiragana, Hangeul, TsangJye |
− | NLSS_NLS3 (0x04) - Hiragana, Hangeul, TsangJye | + | NLSS_APPL (0x10) - Application bit |
− | NLSS_APPL (0x10) - Application bit | + | NLSS_NLS4 (0x40) - Romanji, HanjaCsr |
− | NLSS_NLS4 (0x40) - Romanji, HanjaCsr | + | |
NLSS_KANJI (0x80) - Kanji, Hanji | NLSS_KANJI (0x80) - Kanji, Hanji | ||
− | + | [[Category:Kbd]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | [[Category: | + |
Revision as of 00:30, 5 December 2016
Description
Returns information about the keyboard.
Syntax
#define INCL_KBD #include <os2.h> PKBDINFO pkbdinfo; /* Pointer to keyboard data. */ HKBD hkbd; /* Reserved. Must be 0. */ APIRET rc; /* Return code. */ rc = KbdGetStatus(pkbdinfo, hkbd);
Parameters
- pkbdinfo (PKBDINFO) - output
- Pointer to keyboard data.
A pointer to a KBDKEYINFO structure in which the keyboard status is returned.
- hkbd (HKBD) - input
- Reserved. Must be 0.
Return Code
rc (APIRET) - returns
KbdGetStatus returns one of the following values:
- 0 NO_ERROR
- 373 ERROR_KBD_PARAMETER
- 376 ERROR_KBD_INVALID_LENGTH
- 439 ERROR_KBD_INVALID_HANDLE
- 445 ERROR_KBD_FOCUS_REQUIRED
- 447 ERROR_KBD_KEYBOARD_BUSY
- 504 ERROR_KBD_EXTENDED_SG
Remarks
Some of the keyboard status information can be changed using KbdSetStatus.
In KBDINFO, the upper byte of fsInterim is the NLS shift state. The meaning of the NLS shift varies by language. The following bits are defined to access this data:
NLSS_NLS1 (0x01) - Full-width, 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