Posted by
Michael Schmid on
Nov 15, 2013; 2:58pm
URL: http://imagej.273.s1.nabble.com/Easy-way-for-modifying-Shortcuts-tp5005571p5005572.html
Hi Philippe,
you can define shortcuts for macros. Have the macro run the command you want. These override the standard ImageJ macros (but they don't appear in the menus).
If you have macro sets, you can switch between them by installing one macro set or another, and so you get different sets of shortcuts.
You can even have one macro set install another one by something like
run("Install...", "install="+getDirectory('macros')+"myNextMacroSet.txt");
--
You can also do the 'standard' ImageJ shortcut removal and adding commands with macros.
'Record Macros' tells you how:
run("Create Shortcut... ", "command=[My Command] shortcut=0");
run("Remove...", "command=[*My Command]");
run("Refresh Menus"); //you don't need to restart ImageJ, even if it says so.
The disadvantage of the latter method is that you need to analyze the 'List Shortcuts' table to know which command currently uses a shortcut that you want to redefine.
Also, "Refresh Menus" loses the list of open windows in the 'Window' menu.
Michael
________________________________________________________________
On Nov 15, 2013, at 15:38, Philippe CARL wrote:
> Dear all,
>
> I’m playing a lot with Shortcuts when I analyze some pictures since they
> give the possibility to seriously accelerate the workflow.
>
> But depending on the given type of analysis to perform, the use of different
> lists of Shortcuts would be interesting.
>
> And it is quite heavy to each time first "Remove" old Shortcuts and then
> "Create" new ones when changing from a given analysis to another one.
>
> Thus how is it possible to more easily access and modify the list of
> Shortcuts by using for example a text editor software?
>
> I thank you very much in advance for your help and answer.
>
> Best regards,
>
> Philippe
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html