Is it possible to stopEvent propagation for keys handled by prosemirror core packages like baseKeymap, gapCursor and etc.?
I can think of adding them all to if statement inside handleKeyDown but that doesn’t feel right
My use case:
I want to handle ArrowUp and ArrowDown key presses on parent div when they were not handled by ProseMirror
ProseMirror will call preventDefault() on the keydown event for keys that it handles (where the DOM event handler of command bound via a keymap returns true), and those handlers should run before outer elements get the event, so I’m pretty usre defaultPrevented should be true for handled keys.
And how keys like ‘ArrowUp’,’‘ArrowDown’,’‘ArrowLeft’,’‘ArrowRight’ are handled? Can’t find their handlers in baseKeymap. Do they have any handlers in prosemirror or the browser itself if responsible for cursor navigation? I think it can be the reason why defaultPrevented equals to false