init
Summary
Initializes KeymanWeb and configures KeymanWeb Options.
Note that this is an asynchronous operation.
Syntax
keyman.init(initOptions);
Parameters
initOptions- Type:
Object - Please see the Description section below for the necessary object specification.
Return Value
Promise- A JavaScript Promise fulfilled upon full initialization.
Initialization Options
The initOptions object contains the following members:
uistring|objectoptional- The user interface to be used on desktop devices. Default value:
'float'.
Please see below for the specification of this parameter if using an object value. rootstringoptional- The folder KeymanWeb should consider root. Default value:
undefined, which setsrootto the base folder where keymanweb.js is located. resourcesstringoptional- The image folder URL for UI resources. Default value:
[root]/resources. keyboardsstringoptional- The folder containing local keyboard resources if utilized. Default value:
[root]/keyboards. fontsstringoptional- Folder containing any embedded fonts required for keyboards or the OSK.
Default value:
[root]. attachTypestringoptional- Must be
undefined,'auto', or'manual'. Specifies the default behavior for attaching KeymanWeb to any input elements on the webpage.- If
undefined, KeymanWeb will default to 'manual' for mobile devices and 'auto' for other devices. - If
'auto', KeymanWeb will automatically attach to every non-disabled control, even those added after page initialization. - If
'manual', KeymanWeb must be instructed to attached manually to each control it should handle input for.
- If
If setting initOptions.ui with an object value, it should be specified as follows:
namestring- The name of the ui to utilize for non-mobile devices.
rightbooleanoptional- A Float-UI-only option. Sets right-alignment of the UI. Defaults to false.


