These objects are not available for public use (you cannot construct one and use it), instead these objects are created by the input assist behaviors.
The following description provides an outline of how mask assist processes keystroke, mouse and clipboard interactions when it is applied to an input field containing a masked string.
When the field receives focus, prompt characters are inserted at every marker position that is blank (including positions where blank is an allowed value) and in any position where there is an invalid character. For example, given the mask "#-@@@@" and the value "A" and the prompt character "*", the value becomes "A-****". Protected characters in the value are left as is. Focus is set to the first character position in the value where a user may type.
When the field loses focus, prompt characters are removed from the field. It may be left in an invalid state.
Note that the behavior of focus/blur handling was changed in JWL 2.1. onBlur can leave an incomplete value in the field (e.g., if the mask is ###-##-#### and the user types 151, then tab, 151 is left in the field. Prior to v2.1, if a user returned to the field (onFocus fired), the value would be cleared (as it was invalid). Starting in v2.1, the value is not cleared. Note that this change in behavior does NOT change the fact that the field is marked as invalid when onBlur is fired (with an incomplete value).
When an alphanumeric key is pressed (that is a keypress event is generated), if the position allows the key value (the cursor is at an input position and the key value passes the regular expression test), the character (or prompt character) at the cursor position is overwritten OR the first character in a selection is overwritten (and the remaining characters in the selection set to the prompt character). Then, the cursor is advanced to the next position where a user may type (or the end of the field). If an invalid key is pressed, "nothing happens". Note that if a user enters a valid "space" character (i.e., the a space character is allowed in a position), the prompt character is displayed instead of the space.
When a control key is pressed (that is a keydown event is generated with a control key indicated in the keycode), MaskAssist processes the control key on the keydown event (this is the norm in Windows®). If the control key is a right arrow, the cursor is advanced to the next position in the string where input can occur. If the left arrow is pressed, the cursor is moved "back" to immediately after the previous position where input can occur (thus input may not be possible until left arrow is pressed again -- this allows for positioning the cursor where the backspace key will work). If the Del key is pressed, the character after the cursor position is deleted (or the selection if one is present), and the cursor advanced. If the backpace key is pressed, the character before the cursor position is deleted and the cursor moved back. If tab or enter are pressed, the normal form processing actions are taken. No other control keys are processed specially (e.g., HOME and END are not processed specially but they work as expected.
If the user clicks in the field (and the click is not part of a selection), the cursor is positioned before the "next" character where a user may type.
Cut/Copy/Paste interactions are only handled in IE (Mozilla does not support this) and only limited support can be provided in IE (while it provides a full set of events for managing interactions, IE has only limited access to the clipboard itself which restricts what can be done).
Copy copies the selection to the clipboard verbatim. Cut does the same except it clears the selection (sets all input positions to blank). On a paste, if it appears that the value on the clipboard was a masked string, the "input" characters (non-literal) characters only are pasted otherwise the entire string is pasted. The paste applies characters only to "input" positions (skips literals). If any character fails input validation, the entire paste is cancelled otherwise the cursor is put at the end of the pasted characters (though the browser sometimes then moves the cursor position).
MaskAssist does not work with DBCS characters that are formed using the IME. While the IME is in use, the browsers do not (correctly) generate keyboard events (e.g., keypress). In effect, the IME is used like a clipboard whose contents are pasted when the ime "done' action is invoked. However, the "paste" is not signalled in the browser either.