This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS
Note: This is legacy API call. It is recommended to use 32-bit equivalent
This call binds the logical keyboard to the physical keyboard.
KbdGetFocus (IOWait, KbdHandle)
rc (USHORT) - return:Return code descriptions are:
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.
#define INCL_KBD USHORT rc = KbdGetFocus(IOWait, KbdHandle); USHORT IOWait; /* Indicate if wait */ HKBD KbdHandle; /* Keyboard handle */ USHORT rc; /* return code */
EXTRN KbdGetFocus:FAR INCL_KBD EQU 1 PUSH WORD IOWait ;Indicate if wait PUSH WORD KbdHandle ;Keyboard handle CALL KbdGetFocus Returns WORD