Homepage    |    GitHub    |    API    |    FAQ


Hi Anjula,

What’s the current status?

Btw, a feature request came up that reminded me to bring up a question I had for a while.

How are we handling shortcuts that could be used for plugins? e.g. when the markdown plugin ==mark== syntax is enabled, it would be great to allow a shortcut for that.

1 Like

Hi @tessus,
I’ve missed a couple of updates due to some personal issues. Really sorry about that. I’ve posted an update here.

Since we’re using Electron menus for setting keyboard shortcuts, the plugin should add a menu item when it’s enabled. When adding this menu item, it can get its keyboard shortcut from KeymapService. However, markdown plugins don’t add menu items with the current implementation.

I’m not sure what’s the most appropriate way to do it. But I think we can check for enabled markdown plugins and add new menu items accordingly at application startup.

Please let me know this in advance. You don’t have to tell me any details, just drop me a DM and let me know that you won’t be as active.

There are a few options I could think of. Laurent will have to decide on the architrectural implementation anyway.

As long as the glue (the actual shortcut) is in the code, we should be fine to add them to the editor.
However, only checking at application startup might be insuffucient. Because you could activate a plugin at any time.

Btw, the post I was referring to was (but I think such a request has been submitted before that as well):

We certainly do not have to add that, but it would be a nice addition. At least it would make adding other shortcuts (for plugins) in the future a lot easier.

1 Like

I agree. We can trigger a menu refresh when plugins are enabled/disabled, and check that logic during the refresh.

It’s a good feature to have. I can extend the shortcut editor to support it.

I think the app is not ready to handle custom shortcuts for arbitrary actions. Like there’s nothing to dynamically define an action, add a toolbar button, or menu item, or dynamically change the text.

So I think it’s too early to consider adding this feature. With the recent refactoring of the command system, and the addition of the plugin system, the app is getting more modular, so we can look at this kind of extra feature when all that is ready.

For now it’s best to stick to the plan or at least not too deviate too much from it.