en:docs:fapi:kbdflushbuffer

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

2021/09/17 06:47 · prokushev
2021/08/20 05:18 · prokushev

KbdFlushBuffer

This call clears the keystroke buffer.

Syntax

 KbdFlushBuffer (KbdHandle)

Parameters

  • KbdHandle (HKBD) - input : Default keyboard or the logical keyboard.

Return Code

rc (USHORT) - return

Return code descriptions are:

  • 0 NO_ERROR
  • 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

KbdFlushBuffer completes when the handle has access to the physical keyboard (focus), or is equal to zero and no other handle has the focus.

Family API Considerations

Some options operate differently in the DOS mode than in the OS/2 mode. The KbdHandle is ignored when coding in the DOS mode.

Bindings

C Binding

#define INCL_KBD
 
USHORT  rc = KbdFlushBuffer(KbdHandle);
 
HKBD    KbdHandle;     /* Keyboard handle */
USHORT  rc;            /* return code */

MASM Binding

EXTRN  KbdFlushBuffer:FAR
INCL_KBD            EQU 1
 
PUSH   WORD    KbdHandle     ;Keyboard handle
CALL   KbdFlushBuffer
 
Returns WORD

Note


en/docs/fapi/kbdflushbuffer.txt · Last modified: 2021/09/18 17:20 by prokushev