Output Functions - the Keyboard API
The KeymanWeb core object
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.
- Returns whether or not the char
chis found within the
store) string, setting the internally-tracked index 'n' accordingly.
contextfor an ongoing keyboard operation relative to the caret's present position.
- Context matching: Returns
KC(n,ln,elem) == val.
- Deadkey matching: Seeks to match the
dkat the relative caret position
- Deadkey output: Associates the
dkwith the element at the current caret position, after overwriting
trueif the input event corresponds to a keypress event resulting in character output.
- Index-based output: Outputs a mapped character according to a previous selection from a
KeymanWeb.KA()call upon a
storestring, after deleting
- Returns an object with extended information about a specified keystroke event.
- Keystroke matching: Returns
trueif the event matches the rule's shift mask and key code.
- Load an option
storevalue from a cookie or default value if no prior stored value exists.
nulcontext check: Returns
trueif the length of the
contextis less than or equal to
- Outputs the specified string to an element, overwriting
ndcharacters before the caret.
- Register the keyboard stub and load the keyboard.
- Register the keyboard stub, return true if already registered.
- Save focus: Temporarily saves keyboard processing data for the currently-focused control.