spiegel-keyman/web/docs/engine/reference/interface/loadStore.md
Marc Durdin 1f82507730 docs(web): deprecate unused and obsolete API endpoints and docs cleanup
Deprecate the following obsolete functions and properties:
* `keyman.helpURL`
* `keyman.util.rgba`
* `keyman.util.toFloat`
* `keyman.util.toNumber`
* `keyman.util.toNzString`

Use correct language for code blocks in Keyman Engine for Web
documentation.

Test-bot: skip
2026-08-12 16:07:22 +02:00

1.2 KiB

title
loadStore (KLOAD)

Summary

Load an option store value from a cookie or default value if no prior stored value exists.

Syntax

keyman.interface.loadStore(kbdName, storeName, value);

or

KeymanWeb.KLOAD(kbdName, storeName, value); // Shorthand

Parameters

kbdName
Type: string
The keyboard's identifying internal name.
storeName
Type: string
The option store name that is embedded in the cookie's name.
value
Type: string
A value for the store to use as default if no prior value exists.

Return Value

string
The current value of the store, or the default value provided if the store's value is undefined.

Description

keyman.interface.loadStore() and keyman.interface.saveStore() provide API-based functionality similar to that of the keyboard language's option store. Values will persist across multiple visits to the site by use of cookies. However, these functions cannot interact with stores from existing compiled keyboards due to compilation optimizations. As such, they are most useful for custom-coded web-oriented keyboards.

See also