Keyboard Support

Contact and Search Homepage

Header bottom

Other versions
Version 6.0

On this page

Using Stores

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

Starting with version 6.0 of Keyman, deadkeys and virtual keys are permitted in store statements.

The following statements are used with stores: