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.
Control
read only
: Returns an IKeymanControl
interface that
provides methods for controlling the Keyman process and user
interface.
Errors
read only
: Returns an IKeymanErrors
interface that lists
errors that the API incurred when undertaking various processes.
Hotkeys
read only
: Returns an IKeymanHotkeys
interface that
lists all of the configured interface hotkeys.
Keyboards
read only
: Returns an
IKeymanKeyboardsInstalled
interface that lists all of the currently installed Keyman
keyboards.
Languages
read only
: Returns an IKeymanLanguages
interface that
lists all of the currently avilable Windows languages and input
methods.
Options
read only
: Returns an IKeymanOptions
interface that
lists all of the configuration settings and values for Keyman
Engine.
Packages
read only
: Returns an IKeymanPackagesInstalled
interface that lists all of the currently installed Keyman packages.
SystemInfo
read only
: Returns an IKeymanSystemInfo
interface
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 Desktop 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 Desktop") = vbOK then
package.Uninstall(True)
end if
else
msgbox "The package SamplePackage could not be found."
end if