Allow overriding CodeMirror shortcuts

Just installed 1.3.15 on linux to take advantage of the new features. It's great :smiley:

On setting up custom shortcuts, I found that some shortcuts only work as expected when the markdown editor is not focused. What I'd love to do is use [Alt] + [arrow-left/-right] for historyBack/Forward, in order to quickly navigate between notes I'm working on. This works fine in general, apart from when the markdown editor is active. Then the shortcut makes the cursor jump to the start / end of the line. I assume that the CodeMirror-shortcuts take precedence over custom joplin shortcuts when CodeMirror is the active component.

As these specific shortcuts are widely used in other tools (browsers, VSCode, ...) and I use them subconsciously all the time, I'd rather avoid circumventing this by defining different shortcuts just for joplin. So...


Feature request
Make it possible to override the CodeMirror shortcuts.

In general, my suggestion would be to make Joplin shortcuts (at least the manually defined ones) supersede any other shortcuts of components, as this is probably the desired behavior of the user who configured the shortcut.

3 Likes

Just stumbled over https://github.com/laurent22/joplin/issues/4009 - sounds related (different behavior depending on if editor is active), but might be something completely different (?).

This is on the to-do list! Ideally all keybindings should be re-mapable and all codemirror commands should be exposed to Joplin for remapping.

3 Likes

@CalebJohn will this be implemented eventually ?

@itge13 it's done. All Joplin commands are available to be remapped and if you need access to more powerful functionality from codemirror the Joplin plugin system will allow you to define your own commands and expose them via the command system.

2 Likes