Call Shortcuts in Plugin Code
I try to create a Plugin which should make some of my tasks easier. One of the tasks requires 6 different shortcuts after each other. Now I wanted to ask if someone knows a way to call the preconfigured shortcuts from the Shortcut Mapper. If it’s not possible, does anyone know where in the source code of N++ the definitions of the shortcuts are, so I can use the code as an inspiration.
I know that if you put your commands in your plugin’s top-level menu, that you can use the shortcut mapper to assign the shortcut. (So Plugins > My Nifty Plugin > My Command will be visible on the Shortcut Mapper’s Plugins tab, but Plugins > My Nifty Plugin > My SubMenu > My Deep Command will not be visible to Shortcut Mapper.)
I am not a plugin developer, so I don’t know how to assign a default shortcut. But I know that many plugins do come with default shortcuts for their menu items, so looking at the source code for another plugin might tell you.
Okay, I knew that the TagLEET plugin that @michael-vincent modified/adapted had some default keystrokes when you install it… so I searched his codebase for “shortcut” and found this code which appears to be where it is set up (where the order of the array shown is defined here). Maybe you can use that as an example.
@peterjones Thank you. I’ll check it out right now.