Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 17.0Version 16.0 (current version)Version 15.0Version 14.0Version 13.0Version 12.0Version 11.0Version 10.0Version 2.0Version 1.0 (home page)

On this page

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:

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 sets root 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 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.