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. In the following example, the index statement
store(lowercase) "aeiou" store(uppercase) "AEIOU" + any(lowercase) > index(uppercase, 1) c translate vowels to upper case
The following statements are used with stores:
|Matches on an array of characters
|Outputs from an array of characters
|Outputs an array of characters
|Defines an array of characters
In Keyman Developer 7.0, stores have a maximum length of 4095 characters (note that some elements such as virtual keys take more than one character in the store). In earlier versions, this limit was 255 characters.