adrian wrote:Hi,
Yes, they work just the same, if they have a keyboard shortcut assigned within plugin.xml (extension/@keyboardShortcut) as seen in the example above.
Note that by default most sample plugins don't have such a shortcut set.
Regards,
Adrian
Hum, well I cant seem to get it to work. All I should need is the plugin.xml extension code and a class right?
plugin.xml:
Code: Select all
<extension type="generalExtension" class="oxyMod.shortcutTest" keyboardShortcut="ctrl alt UP"/>
shortcutTest:
Code: Select all
package oxyMod;
import ro.sync.exml.plugin.general.GeneralPluginContext;
import ro.sync.exml.plugin.general.GeneralPluginExtension;
public class shotchutTest implements GeneralPluginExtension {
@Override
public void process(GeneralPluginContext context) {
System.out.println("Test"); // And, I have a breakpoint
}
}
I tried pressing ctrl+alt+UP after <oXygen/> opened and in a document, nothing happens and process() doesn't trigger.
I know i am working in the right files since, if I change the class attribute to something else, it gives an error.
Also, would the keyboard shortcut show up in the <oXygen/> options if we have an @actionName attribute?
I was wondering if it might have changed since. I noticed a shortcut method in PluginExtensionDescription but don't know how what that class is used for.
<oXygen/> XML Author 17.1, build 2015102718 (Standalone)
Thanks.