Trigger Plugin with Shortcut Key

When using plugin in Visual Paradigm, the case the plugin action will be registered to the application toolbar and can be accessed via mouse click. Besides trigger the plugin by mouse click, you can also trigger your plugin via shortcut key.

It is very easy to define shortcut key for your plugin. You can simply define the hotkey argument inside the action node of your plugin action.

<action
id=”com.vp.plugin.sample.shortcut.actionset1.ShortcutActionControl”
actionType=”generalAction”
label=”Plugin with Shortcut Key”
tooltip=”Trigger plugin with shortcut key”
style=”normal”
hotkey=”Ctrl+Alt+Shift+1″
toolbarPath=”com.vp.plugin.sample.shortcut.actionset1.toolbar1/#”>

</action>

* If the hotkey defined in plugin conflict with the default hotkey in VP, then the hotkey on plugin will be ignored.

Sample Plugin

The sample plugin attached in the article demonstrate how to trigger the plugin using shortcut key. After you deploy the plugin into Visual Paradigm you can then press Ctrl + Alt + Shift + 1 to trigger the plugin.

Trigger sample plugin by pressing Ctrl + Alt + Shift + 1

Trigger plugin by pressing Ctrl + Alt + Shift + 1

And a message will be showing in Message Pane indicate the plugin was triggered.

Plugin being triggered

Plugin being triggered

Download Sample Plugin

You can click this link to download the sample plugin.

Related Know-how

Related Links

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply