QAPI actions: keyboard accelerators and toolbar icons

3.45K viewsGeneral Discussion
0

Hi. I have experimented with actions last week, and found some interesting features. As an example, keyboard accelerators are very useful, but in plugin.xml you have to set the ‘accelerator’ attribute in ‘action’ elements with this syntax:
accelerator=”control F9″ (multiple keys separated by spaces)
(not “Ctrl+F9” as you would normally do in the eclipse environment). Under mac osx, the command (apple) key is indicated by “meta”. Other tokens for key modifiers are “alt” and “shift”. I have not figured out how to set different key-sequences for win and mac versions.
I also could not figure out what I am missing in order to have icons shown for toolbar buttons. I enclose a simple plugin showing my attempt.
Thanks in advance for any hint.

0

Hi Brian, thank so much for your prompt response.
As to icons, I found some problems declaring a “/” library in plugin.xml (quantrix launch hangs and plugin not loaded). I resorted to compiling the icon files in the main jar file, and this works.
Thanks also for the directions on accelerators. I will provide two different plugin.xml versions to win and mac users.
Bye

You are viewing 1 out of 2 answers, click here to view all answers.

Latest Questions