I am developing a plugin for Obsidian.md, which relies on a CM6 editor. my plugin uses an editor extension to react to key strokes. Any event with type of “input.type” is processed, then inserted.text is checked for the typed character.
This works great, except for when typing over auto-entered characters, such as when using the “closebrackets” extension. This includes things like hitting the quote key to close a quote. The closing quote character was auto-entered, beyond the caret, when the opening quote was typed. Typing the closing quote simply moves the caret past the auto-entered closing quote. In cases of typing past auto-entered characters like this, the editor extension still gets an event, but that event has no identifying type, or indication as to what key was typed.
Does anyone know of a way around this? I mean, to react properly to keys that are typed, including those that simply shift the caret past auto-entered characters?