Stores provide a facility to match a character against an array of characters. They can also be used to give mnemonic names to strings. Keyman 5.0 introduced the concept of system stores that replace the header statements used in earlier versions of Keyman.
The most common use of stores is to reduce the number of rules required in a keyboard by matching multiple characters rather than a single character in a rule. This is accomplished with the any and index statements. The any statement, on the left hand side of a rule, will match any character in a given store, while the index statement, on the right hand side of the same rule, will return the character at the corresponding position in another store. For example,
store(lowercase) "aeiou" store(uppercase) "AEIOU" + any(lowercase) > index(uppercase, 1) c translate vowels to upper case
The following statements are used with stores:
|any||Matches on an array of characters|
|index||Outputs from an array of characters|
|outs||Outputs an array of characters|
|store||Defines an array of characters|