Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:fapi:kbdgetfocus [2021/10/06 11:59] – created prokushev | en:docs:fapi:kbdgetfocus [2021/11/04 13:26] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{page> | ||
+ | |||
+ | ====== KbdGetFocus ====== | ||
+ | |||
This call binds the logical keyboard to the physical keyboard. | This call binds the logical keyboard to the physical keyboard. | ||
- | ==Syntax== | + | ===== Syntax ===== |
+ | <code c> | ||
| | ||
+ | </ | ||
- | ==Parameters== | + | ===== Parameters |
- | ;IOWait (USHORT) - input : Wait if the physical keyboard is already in use by a logical keyboard. | + | |
- | ::0 - Indicates that the caller wants to wait for the bond. | + | * IOWait ([[USHORT]]) - input : Wait if the physical keyboard is already in use by a logical keyboard. |
- | ::1 - Indicates that the caller does not want to wait for the bond. | + | |
- | ;KbdHandle ([[HKBD]]) - input : Default keyboard or the logical keyboard. | + | |
+ | | ||
+ | |||
+ | ===== Return Code ===== | ||
+ | |||
+ | rc (USHORT) - return: | ||
+ | |||
+ | * 0 NO_ERROR | ||
+ | * 439 ERROR_KBD_INVALID_HANDLE | ||
+ | * 446 ERROR_KBD_FOCUS_ALREADY_ACTIVE | ||
+ | * 447 ERROR_KBD_KEYBOARD_BUSY | ||
+ | * 464 ERROR_KBD_DETACHED | ||
+ | * 504 ERROR_KDB_EXTENDED_SG | ||
- | ==Return Code== | ||
- | ;rc (USHORT) - return: | ||
- | * 0 NO_ERROR | ||
- | * 439 ERROR_KBD_INVALID_HANDLE | ||
- | * 446 ERROR_KBD_FOCUS_ALREADY_ACTIVE | ||
- | * 447 ERROR_KBD_KEYBOARD_BUSY | ||
- | * 464 ERROR_KBD_DETACHED | ||
- | * 504 ERROR_KDB_EXTENDED_SG | ||
The keyboard handle identifies which logical keyboard to bind to. If the physical keyboard is not bound to a logical or default keyboard, then the bind proceeds immediately. The logical keyboard, identified by the handle, receives all further key strokes from the physical keyboard. If the physical keyboard is already in use by a logical keyboard, then the thread issuing KbdGetFocus waits until the bond can be made. Waiting threads do not execute in any definable order. | The keyboard handle identifies which logical keyboard to bind to. If the physical keyboard is not bound to a logical or default keyboard, then the bind proceeds immediately. The logical keyboard, identified by the handle, receives all further key strokes from the physical keyboard. If the physical keyboard is already in use by a logical keyboard, then the thread issuing KbdGetFocus waits until the bond can be made. Waiting threads do not execute in any definable order. | ||
- | ==Bindings== | + | ===== Bindings |
- | === C === | + | |
- | <PRE> | + | ==== C ==== |
+ | <code c> | ||
#define INCL_KBD | #define INCL_KBD | ||
Line 31: | Line 42: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM === | + | ====MASM |
- | <PRE> | + | <code asm> |
EXTRN KbdGetFocus: | EXTRN KbdGetFocus: | ||
INCL_KBD | INCL_KBD | ||
Line 43: | Line 54: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
- | [[Category:Kbd]] | + | {{page> |