KbdSetCp
Appearance
Description
This function supports the code page switching for the keyboard. It sets to an installed code page, which is loaded if necessary.
Sets the current keyboard code page used to translate keystrokes received from the keyboard. This causes a change in the translation of keys. The code page can be any code page (except EBCDIC to DBCS). Setting this code page does not affect the display or process code pages.
Syntax
#define INCL_KBD #include <os2.h> ULONG ulReserved; /* Reserved. Must be 0. */ USHORT pidCP; /* Code page ID. */ HKBD hkbd; /* Reserved. Must be 0. */ APIRET rc; /* Return Code. */ rc = KbdSetCp(ulReserved, pidCP, hkbd);
Parameters
- ulReserved (ULONG) - input
- Reserved. Must be 0.
- pidCP (USHORT) - input
- Code page ID.
The code page ID must be the ID of a code page installed on the system or zero.
- hkbd (HKBD) - input
- Reserved. Must be 0.
Return Code
rc (APIRET) - returns
KbdSetCp returns one of the following values:
- 0 NO_ERROR
- 439 ERROR_KBD_INVALID_HANDLE
- 445 ERROR_KBD_FOCUS_REQUIRED
- 447 ERROR_KBD_KEYBOARD_BUSY
- 448 ERROR_KBD_INVALID_CODEPAGE
- 504 ERROR_KBD_EXTENDED_SG
Remarks
Example Code
Related Functions
- [[OS2 API:CPI: