Keyboard Support

Contact and Search Homepage

Header bottom

On this page



The begin rule defines the starting group for the keyboard.


begin [encoding] > use(startGroup)


ANSI or Unicode. If omitted, assumes ANSI.
The group that processing will start at.


The begin rule tells Keyman which group should be processed first when it receives a keystroke. You can specify either ANSI or Unicode starting groups in a single begin rule. If encoding is omitted, the ANSI option is assumed, which matches the legacy Keyman 4.0 and older begin rule.

In this context, ANSI means the current legacy system codepage for the computer.

You can include two begin rules in a single keyboard file. In this case, one must be Unicode and the other ANSI. Keyman will determine which group to use on the basis of the active application.

Keyboards which do not contain a begin Unicode rule are supported only on Keyman Desktop. All other platforms will only work with Unicode.

The right hand side of the begin rule can have only a use() statement. The begin rule is the only rule that is not part of a group, and is required for every keyboard.


Example: using begin in a Unicode keyboard

begin Unicode > use(main)

group(main) using keys      


The begin statement can be used in keyboards on all platforms.

WindowsmacOSLinuxDesktop webMobile webiOSAndroid

Version history

This line originated in SIL-CC, and a simplified version was used in Keyman for consistency. The ANSI/Unicode distinction was introduced in Keyman 5.

See also