no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | en:docs:fapi:kbdsetstatus [2018/08/31 15:09] – created prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | This call sets the characteristics of the keyboard. | ||
+ | |||
+ | ==Syntax== | ||
+ | | ||
+ | |||
+ | ==Parameters== | ||
+ | ;StatData (PKBDINFO) - input : Address of the keyboard status structure: | ||
+ | :length ([[USHORT]]) : Length, in bytes, of this data structure, including length. | ||
+ | ::10 - Only valid value. | ||
+ | :sysstate (USHORT) : 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. | ||
+ | ''' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | : | ||
+ | : | ||
+ | ''' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | :shiftstate (USHORT) : Shift state. | ||
+ | ''' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ;KbdHandle ([[HKBD]]) - input : Default keyboard or the logical keyboard. | ||
+ | |||
+ | ==Return Code== | ||
+ | rc (USHORT) - return | ||
+ | Return code descriptions are: | ||
+ | * 0 NO_ERROR | ||
+ | * 376 ERROR_KBD_INVALID_LENGTH | ||
+ | * 377 ERROR_KBD_INVALID_ECHO_MASK | ||
+ | * 378 ERROR_KBD_INVALID_INPUT_MASK | ||
+ | * 439 ERROR_KBD_INVALID_HANDLE | ||
+ | * 445 ERROR_KBD_FOCUS_REQUIRED | ||
+ | * 447 ERROR_KBD_KEYBOARD_BUSY | ||
+ | * 464 ERROR_KBD_DETACHED | ||
+ | * 504 ERROR_KBD_EXTENDED_SG | ||
+ | |||
+ | ==Remarks== | ||
+ | Shift return (bit 8 in sysstate) must be disabled in ASCII mode. | ||
+ | |||
+ | KbdSetStatus is ignored for a Vio-windowed application. | ||
+ | |||
+ | ===Family API Considerations=== | ||
+ | Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following restrictions apply to KbdSetStatus when coding in the DOS mode: | ||
+ | * KbdSetStatus does not accept a bit mask of 10 (ASCII on, Echo Off). | ||
+ | * Raw (binary) Mode and Echo On are not supported and return an error if requested. | ||
+ | * KbdHandle is ignored. | ||
+ | * Interim character is not supported. | ||
+ | * Turnaround character is not supported. | ||
+ | |||
+ | ==Example Code== | ||
+ | ===C Binding=== | ||
+ | <PRE> | ||
+ | typedef struct _KBDINFO { /* kbst */ | ||
+ | USHORT cb; /* length in bytes of this structure */ | ||
+ | USHORT fsMask; | ||
+ | USHORT chTurnAround; | ||
+ | USHORT fsInterim; | ||
+ | USHORT fsState; | ||
+ | }KBDINFO; | ||
+ | |||
+ | #define INCL_KBD | ||
+ | |||
+ | USHORT | ||
+ | |||
+ | PKBDINFO | ||
+ | HKBD | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
+ | |||
+ | ===MASM Binding=== | ||
+ | <PRE> | ||
+ | KBDINFO struc | ||
+ | kbst_cb | ||
+ | kbst_fsMask | ||
+ | kbst_chTurnAround dw ? ;define TurnAround character | ||
+ | kbst_fsInterim | ||
+ | kbst_fsState | ||
+ | KBDINFO ends | ||
+ | |||
+ | EXTRN KbdSetStatus: | ||
+ | INCL_KBD | ||
+ | |||
+ | PUSH@ OTHER | ||
+ | PUSH | ||
+ | CALL | ||
+ | |||
+ | Returns WORD | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ====== Note ====== | ||
+ | |||
+ | Text based on [[http:// | ||
+ | |||
+ | {{page> | ||
+ | |||