Keyboard Support

Contact and Search Homepage

Header bottom

On this page



The set() statement changes the value of a variable store.

The set() statement can also be used to set certain system store values, which controls some aspects of Keyman.


... > set(storeName = value)
... > set(&systemStore = value)


The name of the variable store to be updated.

The name of a system store to be updated. The following system stores are supported:

  • &layer - set the visible layer on a touch keyboard
A string value or the name of another store to retrieve a value from.


The set() statement allows the content of a store to be changed dynamically, either to a string value or to the content of another store, during use of the keyboard. Changing store content while using one application will change it for all applications until Keyman is closed or the keyboard is uninstalled. If you want to make the changed store content permanent, to become the default content when restarting Keyman, the set() statement should be followed by a save() statement.


Example: Using set()

store(opt1) '0'
+ [CTRL ALT K_1] > set(opt1='1')
+ [CTRL ALT K_2] > set(opt1='2')


The set() statement can be used in keyboards on all platforms.

WindowsmacOSLinuxDesktop webMobile webiOSAndroid

Version history

The set() statement was introduced in Keyman 8.0.

Keyman for macOS 11.0.221 added support for if(), set(), save() and reset() for variable stores.

See also