International Keyboard Support


Visual PRO/5 2.0 can be configured to allow or reject user requests to change the keyboard language setting in Windows 95 and Windows NT.

Application-Level Settings

Including the following MODE with the OPEN verb defines the settings that take place at the application level:

MODE

Description

"KEYCHANGE={YES|NO}"

Added to the OPEN of a SYSGUI device, this mode directs Visual PRO/5 to allow or reject the Windows Keyboard Request event that controls the setting of international keyboards in Windows 95 or Windows NT:

  • "KEYCHANGE=YES" allows the change.

  • "KEYCHANGE=NO" rejects the change.

If no MODE is specified, Visual PRO/5 does rejects keyboard changes.

Window-Level Settings

The following SENDMSG() function defines the setting at the top window level (a child window adopts the behavior of its top level window):

Set Keyboard Request - Keyboard SENDMSG() Function 23

SENDMSG(chan,id,23,wparm,$$)

This function defines the keyboard change settings for the current top level window (and its contained child windows). The following identifies the entry for the wparm parameter.

Parameter Setting

Description

0

Reject keyboard changes.

1

Accept keyboard changes.

If a keyboard change request is accepted for a given window, Visual PRO/5 responds to the second message from Windows (i.e. the message indicating keyboard and character set), by requesting a character set change for the font being used by the window and its contents. In addition, a Notify event message is sent to the Visual PRO/5 application, and contains a notice string described by the following template:

context:u(2),code:i(1),id:u(2),objtype:i(2),charset:u(2)

The context, code, id, and objtype fields are common to all notice strings. The code field has a value of 1, and id field has a value of 0. The charset field indicates the character set to which the new font pertains, and has one of the following values:

Character Set

Decimal Value

Character Set

Decimal Value

ANSI

0

HEBREW

9

DEFAULT

1

ARABIC

10

SYMBOL

2

GREEK

11

SHIFTJIS

3

TURKISH

12

HANGEUL

4

THAI

13

GB2312

5

EASTEUROPE

14

CHINESEBIG5

6

RUSSIAN

15

OEM

7

BALTIC

16

JOHAB

8

MAC

17

A Visual PRO/5 application should use this notice string to change any !CTYPE strings used by INPUTE controls to ensure that user input will be properly recognized. See Set !CTYPE Value - INPUTE SENDMSG() Function 37.

Upon startup, SYSWINDOW selects a keyboard based upon the character set of the window font. If the user changes the font in the SYSWINDOW, the keyboard is rematched at the same time. If the chosen font pertains to an invalid or unidentified character set, SYSWINDOW will select the keyboard that was used by the last active window. For Visual PRO/5 to use the correct keyboard, the selected fonts must support the installed character sets and keyboards.

Unlike Windows 95 and Windows NT, which manage keyboard and character sets for entire applications, Visual PRO/5 manages keyboard and character sets on a window-by-window basis. The algorithm used by Visual PRO/5 to change the control fonts when a keyboard change occurs is based on the currently selected control font.