init
Summary
Initializes KeymanWeb and configures KeymanWeb Options.
Syntax
keyman.init(initOptions);
Parameters
initOptions
- Type:
Object
- Please see the Description section below for the necessary object specification.
Return Value
undefined
Initialization Options
The initOptions
object contains the following members:
ui
string|object
optional- 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. root
string
optional- The folder KeymanWeb should consider root. Default value:
undefined
, which setsroot
to the base folder where keymanweb.js is located. resources
string
optional- The image folder URL for UI resources. Default value:
[root]/resources
. keyboards
string
optional- The folder containing local keyboard resources if utilized. Default value:
[root]/keyboards
. fonts
string
optional- Folder containing any embedded fonts required for keyboards or the OSK.
Default value:
[root]
. attachType
string
optional- 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:
name
string
- The name of the ui to utilize for non-mobile devices.
right
boolean
optional- A Float-UI-only option. Sets right-alignment of the UI. Defaults to false.