An input processor is a function that contains logic to handle keyboard events. In the process of
handling these keyboard events, they can modify the user's document (e.g. by inserting text or
deleting text or moving the cursor).
Input processors are used to implement features like tab completion, auto-indentation, and
automatic closing of brackets.
They are expected to set args.handled to true if they handled the event and do not want it to
be propagated to other processors.
Input Processor
An input processor is a function that contains logic to handle keyboard events. In the process of handling these keyboard events, they can modify the user's document (e.g. by inserting text or deleting text or moving the cursor).
Input processors are used to implement features like tab completion, auto-indentation, and automatic closing of brackets.
They are expected to set
args.handled
totrue
if they handled the event and do not want it to be propagated to other processors.Please see Processors for more information.
Returns
A modified document, or
undefined
if the processor did not modify the document.