subcalls.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
KbdSetCp (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_KBD
USHORT KbdSetCp(usReserved, idCodePage, hkbd)
USHORT usReserved; /* must be zero */
USHORT idCodePage; /* code-page identifier */
HKBD hkbd; /* keyboard handle */
The KbdSetCp function sets the code-page identifier for the specified
logical keyboard. The code-page identifier defines which translation table
MS OS/2 uses to translate keystrokes into character values. The code-page
identifier may be any value specified in a codepage command in the
config.sys file, or 0x0000 for the default translation table for the logical
keyboard.
The KbdSetCp function also clears the input buffer of the logical keyboard.
Parameter Description
────────────────────────────────────────────────────────────────────────────
usReserved Specifies a reserved value; must be zero.
idCodePage Specifies the code-page identifier. If the identifier is 0x0000,
the default translation table is used. The following are the
valid code-page numbers:
Number Code page
────────────────────────────────────────────────────────────────
437 United States
850 Multilingual
860 Portuguese
863 French-Canadian
865 Nordic
hkbd Identifies the logical keyboard. The handle must have been
created previously by using the KbdOpen function.
Return Value
The return value is zero if the function is successful. Otherwise, it is an
error value.
Example
This example calls KbdSetCp to change the Kbd subsystem so that it uses the
U.S. multilingual code page (850) when translating keystrokes for the
default keyboard. The code page must be installed by the config.sys file or
this function returns an error value:
KbdSetCp(0, /* reserved */
850, /* code-page identifier */
0); /* keyboard handle */
See Also
KbdGetCp, KbdOpen, KbdSetCustXt
♦