right now, i managed to create an extension that triggers a function if i press ctrl and then click the right mouse button. However codemirror already has a functionality (adding an additional cursor at mouse position) that also triggers.
how is it possible to prevent the default event from triggering?
i tried to do it with the keymaps but click events are not part of the keymaps
CodeMirror’s mouse handling happens in mousedown/mousemove/mouseup handlers. If you override mousedown and call preventDefault (or return true from a handler registered through the library), that should prevent the default response.