context statement reproduces part or all of the context buffer.
... > context ... > context(offset) ... context(offset) > ...
- The character offset in the context from which the output character is selected, starting at
1. The index increments for each character or statement found, with two caveats:
outs()statements are expanded prior to calculating the offset.
if()statements are not included in the calculation of the offset, which is different to how
index()statements calculate offset.
context()statement itself, if the
context()statement is in the context (third form above).
context statement reproduces the context stored from the rule match, or a single character of it, into the output. Use the
context statement as much as possible as it is significantly faster than using the index statement.
A single character from the context can be output (on the right-hand side of a rule) or matched (on the left-hand side of a rule)
Note that although the
context() form can be used in the left-hand side of a rule, the
context form cannot.
any(cons) "W" + any(key) > context index(keyout,3) "contex" + "t" > context(2) context(6) c outputs "ox"
context statement can be used in keyboards on all platforms.
|Windows||macOS||Linux||Desktop web||Mobile web||iOS||Android|
The context(n) form was introduced in version 6.0.
The context statement was introduced in Keyman 3.0.