group() statement defines a set of rules to be processed together.
group(groupName) group(groupName) using keys group(groupName) readonly
The unique name of the group, which can be referenced by
group() statement tells Keyman to start a new set of rules. Keyman
supports three sorts of groups: key processing groups, read-only groups, and
context processing groups. Key processing groups can include context checking,
but context processing groups cannot include key checking. Read-only groups,
like context processing groups, cannot include key checking. Keyman will use
first the group specified in the
begin statement, and move from
there onto other groups.
To tell Keyman that the group should include key processing, you should include
using keys section of the statement; if that is omitted, the group checks
only the context. The keystroke will remain the same during processing; you can
have many groups that each use
using keys, and the keystroke will be the same
for all of them. The key section of a rule (including the
+ sign) is not valid
for context processing groups.
Read-only groups are new in Keyman 15. They are used primarily from
PostKeystroke entry points, and indicate that text output is not permitted
from rules within the group. The purpose of these groups is typically to change
the current layer of the touch keyboard, or perform similar state updates.
use() statements in a read-only group may only reference other
context statement is added to the front of every rule
output in a read-only group, if it is not already present, to ensure that the
input context is not modified. As it is not legal to have an empty output, you
may use the
context statement, not the
nul statement on the right-hand side
of an otherwise empty output.
In a read-only group, only the following output statements are permitted:
call()- the custom function must not attempt to do any output
context- only at the start of the output
use()- use other
See Casing Support for a more comprehensive example of
group(main) using keys + [K_K] > U+0E01 group(syllablecheck) any(cons) any(vowel) any(cons) > context $nbsp group(nextLayer) readonly '. ' > layer('shift')
group() statement can be used in keyboards on all platforms.
|Windows||macOS||Linux||Desktop web||Mobile web||iOS||Android|
- The group construct was introduced in Keyman 3.0.
readonlygroup type was introduced in Keyman 15.0.