Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:fapi:kbdxlate [2021/10/06 12:01] – created prokushev | en:docs:fapi:kbdxlate [2021/11/04 13:25] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{page> | ||
+ | |||
+ | ====== KbdXlate ====== | ||
+ | |||
This call translates scan codes with shift states into ASCII codes. | This call translates scan codes with shift states into ASCII codes. | ||
- | ==Syntax== | + | ===== Syntax |
- | | + | <code c> |
+ | KbdXlate (XlateRecord, | ||
+ | </ | ||
- | ==Parameters== | + | ===== Parameters ===== |
- | ; | + | |
- | ::chardata (KBDKEYINFO): | + | |
- | ::kbdflag (USHORT): See the KbdDDFlagWord call in the " | + | |
- | ::xlate (USHORT): Translation flag: | + | |
- | :::0 - Translation incomplete. | + | |
- | :::1 - Translation complete. | + | |
- | :: | + | |
- | :: | + | |
- | ;KbdHandle (HKBD) - input: Default keyboard or the logical keyboard. | + | |
- | ==Return Code== | + | * XlateRecord (PKBDTRANS) - input: Address of the translation record structure: |
- | ;rc (USHORT) - return: | + | * chardata (KBDKEYINFO): |
- | *0 NO_ERROR | + | * kbdflag (USHORT): See the KbdDDFlagWord call in the " |
- | *439 ERROR_KBD_INVALID_HANDLE | + | * xlate (USHORT): Translation flag: |
- | *445 ERROR_KBD_FOCUS_REQUIRED | + | * 0 - Translation incomplete. |
- | *447 ERROR_KBD_KEYBOARD_BUSY | + | * 1 - Translation complete. |
- | *464 ERROR_KBD_DETACHED | + | * xlatestate1 (USHORT): Identifies the state of translation across successive calls; initially the value should be zero. It may take several calls to this function to complete a character. The value should not be changed unless a new translation is required, that is, reset value to zero. |
- | *504 ERROR_KBD_EXTENDED_SG | + | *xlatestate2 (USHORT): See description for xlatestate1. |
+ | * KbdHandle (HKBD) - input: Default keyboard or the logical keyboard. | ||
+ | |||
+ | ===== Return Code ===== | ||
+ | |||
+ | rc (USHORT) - return: | ||
+ | |||
+ | | ||
+ | *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 ===== | ||
- | ==Remarks== | ||
It may take several calls to complete a translation because of accent key combinations, | It may take several calls to complete a translation because of accent key combinations, | ||
The Xlatestate1 and Xlatestate2 are for use by the keyboard translation routines. These fields are reserved and must only be accessed by the caller prior to starting a translation sequence and then they must be set to zero. The KbdXlate function is intended to be used for translating a particular scan code for a given shift state. The KbdXlate function is not intended to be a replacement for the OS/2 system keystroke translation function. | The Xlatestate1 and Xlatestate2 are for use by the keyboard translation routines. These fields are reserved and must only be accessed by the caller prior to starting a translation sequence and then they must be set to zero. The KbdXlate function is intended to be used for translating a particular scan code for a given shift state. The KbdXlate function is not intended to be a replacement for the OS/2 system keystroke translation function. | ||
- | ==Bindings== | + | ===== Bindings |
- | ===C=== | + | |
- | <PRE> | + | ====C==== |
+ | <code c> | ||
typedef struct _KBDTRANS { /* kbxl */ | typedef struct _KBDTRANS { /* kbxl */ | ||
UCHAR chChar; | UCHAR chChar; | ||
Line 53: | Line 64: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM=== | + | ====MASM==== |
- | <PRE> | + | <code asm> |
KBDTRANS struc | KBDTRANS struc | ||
kbxl_chChar | kbxl_chChar | ||
Line 78: | Line 89: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
- | [[Category:Kbd]] | + | {{page> |