Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

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

On this page

KKM

Summary

Keystroke matching: Returns true if the event matches the rule's shift mask and key code.

Syntax

KeymanWeb.KKM(e, shiftCode, keyCode);

Parameters

e
Type: Object
A keystroke-related event object to match.
shiftCode
Type: number
The shift-state code the event object should match.
keyCode
Type: number
The key code the event object should match.

Return Value

boolean
true if the keystroke matches the desired values, otherwise false.

Description

This is a core element of keyboard input management within KeymanWeb, typically called automatically during keystroke processing events. For comparison with Developer 'rules' from keyboard source code, in the rule

"a" + "'" > "รก"

a keyboard would check that the triggering keystroke ("'") matches by using

KeymanWeb.KKM(e, 0, 39)

from within a raised keystroke event with object e, which checks that the keystroke represented by e is unshifted and matches the underlying keycode value for "'", which is 39 in ASCII and Unicode.

As KeymanWeb.KKM() receives an event object as one of its parameters, it does not need a direct link to the element receiving input.

See also

KeymanWeb.KCM()