Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 2.0

On this page

Output Functions - the Keyboard API

The KeymanWeb core object window.tavultesoft.keymanweb also exposes a number of functions for low-level processing of input, context and output. These functions are designed for use by keyboards compiled through Keyman Developer in order to facilitate input text processing and will also work for custom-coded KeymanWeb keyboards. As such, most of these functions should only be called by keyboard code, and a good understanding of the Keyman Keyboard Language will prove extremely beneficial toward understanding the keyboard API functions enumerated in this section.

Custom user interfaces would not normally use these functions, but they are described here as some custom keyboards, such as IME-style keyboards, may need to interact with the user interface.

KA Function
Returns whether or not the char ch is found within the any(store) string, setting the internally-tracked index 'n' accordingly.
KB Function
Flash body or element as substitute for an audible feedback beep.
KBR Function
Cancels a previous feedback beep operation on a page element.
KC Function
Gets context for an ongoing keyboard operation relative to the caret's present position.
KCM Function
Context matching: Returns true if KC(n,ln,elem) == val.
KDM Function
Deadkey matching: Seeks to match the deadkey state dk at the relative caret position n.
KDO Function
Deadkey output: Associates the deadkey state dk with the element at the current caret position, after overwriting nd characters.
KIFS Function
KIFS compares the content of a system store with a string value.
KIK Function
Returns true if the input event corresponds to a keypress event resulting in character output.
KIO Function
Index-based output: Outputs a mapped character according to a previous selection from a KeymanWeb.KA() call upon a store string, after deleting nd characters.
KKI Function
Returns an object with extended information about a specified keystroke event.
KKM Function
Keystroke matching: Returns true if the event matches the rule's shift mask and key code.
KLOAD Function
Load an option store value from a cookie or default value if no prior stored value exists.
KN Function
nul context check: Returns true if the length of the context is less than or equal to n characters.
KO Function
Outputs the specified string to an element, overwriting nd characters before the caret.
KR Function
Register the keyboard stub and load the keyboard.
KRS Function
Register the keyboard stub, return true if already registered.
KSAVE Function
Save an option store value to a cookie for the active keyboard.
KSETS Function
KSETS sets the value of a system store to a string.
KSF Function
Save focus: Temporarily saves keyboard processing data for the currently-focused control.
KT Function
Inserts a text string and optional deadkey into the active output element.