Editing keyboard layouts

TStandardEditableVirtualKeyboard encapsulates a set of mapping rules for keys corresponding to the keys on standard physical keyboards (IBM and Macintosh). You can use this class to create a keyboard layout for use on any physical keyboard containing a subset of the virtual keys defined by the EVirtualKeyCode enum.

The simplest way to create a keyboard layout is to copy an existing layout and edit it. Adding a mapping rule to a virtual key and modifier combination replaces any previous rule for that combination.

To edit or create a virtual keyboard:

  1. Add individual mapping rules to a TStandardEditableVirtualKeyboard with the AddResult member function. To create a mapping rule for a particular key, supply the virtual key code, the required modifier keys, and the text result. You can express the text result as either a text instance or a single UniChar.
    TStandardEditableVirtualKeyboard also provides some default relationships for modifier keys so that you do not need to create additional mapping rules for the Caps Lock and right modifier keys. You can specify parameters to override the behavior of these keys:
  2. Call the Compact member function. This function compresses the added rules for more efficient storage.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker