Jump to content

KbdSetStatus: Difference between revisions

From EDM2
Created page with "==Description== Sets the characteristics of the keyboard. ==Syntax== <PRE> #define INCL_KBD #include <os2.h> PKBDINFO pkbdinfo; Pointer to keyboard status.: HKBD ..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 12: Line 12:


rc = KbdSetStatus(pkbdinfo, hkbd);
rc = KbdSetStatus(pkbdinfo, hkbd);
</PRE>


</PRE>
==Parameters==
==Parameters==
; pkbdinfo (PKBDINFO) - output : Pointer to keyboard status.
;pkbdinfo (PKBDINFO) - output : Pointer to keyboard status.
A pointer to a KBDINFO structure in which the keyboard status is returned.  
A pointer to a KBDINFO structure in which the keyboard status is returned.
; hkbd (HKBD) - input : Reserved. Must be 0.


; hkbd (HKBD) - input : Reserved. Must be 0.
==Return Code==
==Return Code==
  rc (APIRET) - returns
  rc (APIRET) - returns
KbdSetStatus returns one of the following values:
KbdSetStatus returns one of the following values:
* 0 NO_ERROR
* 376 ERROR_KDB_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
* 504 ERROR_KBD_EXTENDED_SG


* 0          NO_ERROR.
* 376        ERROR_KDB_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
* 504        ERROR_KBD_EXTENDED_SG
==Remarks==
==Remarks==
In the KBDINFO structure, the upper byte of fsInterim is the NLS shift state, and can be modified by KbdSetStatus.  
In the KBDINFO structure, the upper byte of fsInterim is the NLS shift state, and can be modified by KbdSetStatus.
 
==Example Code==
<PRE>
 
</PRE>
==Related Functions==
 
 


[[Category:The OS/2 API Project]]
[[Category:Kbd]]

Revision as of 02:32, 5 December 2016

Description

Sets the characteristics of the keyboard.

Syntax

#define INCL_KBD
#include <os2.h>

PKBDINFO    pkbdinfo;  /*  Pointer to keyboard status. */
HKBD        hkbd;      /*  Reserved.  Must be 0. */
APIRET      rc;        /*  Return code. */

rc = KbdSetStatus(pkbdinfo, hkbd);

Parameters

pkbdinfo (PKBDINFO) - output
Pointer to keyboard status.

A pointer to a KBDINFO structure in which the keyboard status is returned.

hkbd (HKBD) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns

KbdSetStatus returns one of the following values:

  • 0 NO_ERROR
  • 376 ERROR_KDB_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
  • 504 ERROR_KBD_EXTENDED_SG

Remarks

In the KBDINFO structure, the upper byte of fsInterim is the NLS shift state, and can be modified by KbdSetStatus.