IKeyman Interface
Introduction
The IKeyman interface is the top-level interface for the Keyman Engine
for Windows API. The IKeyman interface can be instantiated with the
CoKeyman coclass; it will also be returned from a call to
CreateObject("kmcomapi.Keyman").
Interface Hierarchy
IDispatch
IKeyman
Properties
AutoApply- Determines whether settings changes are applied to Keyman Engine automatically as they are made.
Controlread only- Returns an
IKeymanControlinterface that provides methods for controlling the Keyman process and user interface. Errorsread only- Returns an
IKeymanErrorsinterface that lists errors that the API incurred when undertaking various processes. Hotkeysread only- Returns an
IKeymanHotkeysinterface that lists all of the configured interface hotkeys. Keyboardsread only- Returns an
IKeymanKeyboardsInstalledinterface that lists all of the currently installed Keyman keyboards. Languagesread only- Returns an
IKeymanLanguagesinterface that lists all of the currently avilable Windows languages and input methods. Optionsread only- Returns an
IKeymanOptionsinterface that lists all of the configuration settings and values for Keyman Engine. Packagesread only- Returns an
IKeymanPackagesInstalledinterface that lists all of the currently installed Keyman packages. SystemInforead only- Returns an
IKeymanSystemInfointerface that describes the current system configuration.
Methods
Apply()- Apply all settings changes to Keyman Engine.
Refresh()- Refresh the snapshot of keyboards and settings which is captured when the object is instantiated.
Examples
VBScript
This example can be saved with a .vbs extension to run through Windows Scripting. This is similar to the uninstall script that Keyman for Windows generates for packages which have a Start Menu Uninstall entry.
dim kmcom, package
Set kmcom = CreateObject("keymanapi.Keyman")
n = kmcom.Packages.IndexOf("SamplePackage")
if n >= 0 then
Set package = kmcom.Packages(n)
if msgbox("Uninstall package "+package.Description+"?", vbOKCancel, "Keyman for Windows") = vbOK then
package.Uninstall(True)
end if
else
msgbox "The package SamplePackage could not be found."
end if


