|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: How to add a shortcut key to my plugin menu item? » » » » Post: Re: How to add a shortcut key to my plugin menu item? |
Print at Dec 21, 2025, 3:14:36 AM |
| Posted by Puybaret at Nov 2, 2016, 3:33:35 PM |
|
Re: How to add a shortcut key to my plugin menu item? You can add shortcut by binding an instance of KeyStroke with an action that will execute your plugin. The good place to program this should be in the method getActions of your plug-in : public PluginAction [] getActions() {If you want that the shortcut appears beside the menu item of the plug-in, you'll have to find the menu item in the menu bar returned by ((JFrame)SwingUtilities.getWindowAncestor((JComponent)getHomeController().getView())).---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
|
|
Current timezone is GMT Dec 21, 2025, 3:14:36 AM |