Table of Contents

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 04:47 · prokushev · 0 Comments
2021/08/20 03:18 · prokushev · 0 Comments

KbdSetCp

This call allows the process to set the code page used to translate key strokes received from the keyboard.

Syntax

KbdSetCp (Reserved, CodePageID, KbdHandle)

Parameters

Identifier Description
0 Resident code page
437 IBM PC US 437
850 Multilingual
860 Portuguese
863 Canadian-French
865 Nordic

Return Code

rc (USHORT) - return:Return code descriptions are:

Remarks

Keyboard code page support is not available without the DEVINFO=KBD statement in the CONFIG.SYS file. Refer to IBM Operating System/2 Standard Edition Version 1.2 Using Advanced Features for a complete description of CODEPAGE and DEVINFO.

Bindings

C

#define INCL_KBD
 
USHORT  rc = KbdSetCp(Reserved, CodePageID, KbdHandle);
 
USHORT  Reserved;      /* Reserved (must be zero) */
USHORT  CodePageID;    /* code page ID */
HKBD    KbdHandle;     /* Keyboard handle */
 
USHORT  rc;            /* return code */

MASM

EXTRN  KbdSetCp:FAR
INCL_KBD            EQU 1
 
PUSH   WORD    Reserved      ;Reserved (must be zero)
PUSH   WORD    CodePageID    ;code page ID
PUSH   WORD    KbdHandle     ;Keyboard handle
CALL   KbdSetCp
 
Returns WORD