Keystroke matching: Returns
true if the event matches the rule's shift mask and key code.
keyman.interface.keyMatch(e, shiftCode, keyCode);
KeymanWeb.KKM(e, shiftCode, keyCode); // Shorthand
- A keystroke-related event object to match.
- The shift-state code the event object should match.
- The key code the event object should match.
trueif the keystroke matches the desired values, otherwise
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
keyman.interface.keyMatch(e, 0, 39)
from within a raised keystroke event with object
e, which checks that the keystroke represented by
is unshifted and matches the underlying keycode value for
"'", which is
39 in ASCII and Unicode.
keyman.interface.keyMatch() receives an event object as one of its parameters, it does not need a direct link to the
element receiving input.