Re: Easy way for modifying Shortcuts
Posted by
Bill Christens-Barry-2 on
Nov 21, 2013; 5:05pm
URL: http://imagej.273.s1.nabble.com/Easy-way-for-modifying-Shortcuts-tp5005571p5005645.html
Michael,
"Refresh Menus" uninstalls installed macros in ImageJ, so Philippe will need to reinstall any that he wants to remain available. This will reinitialize variables used in those macros unless some means of preserving them is used. Maybe an installed macro could print the values of these variables to the Log window beforehand and a reloaded macro could restore them from the Log window afterward.
Bill Christens-Barry
{
Hi Philippe,
the extra space for 'Fn' shortcut keys is probably meant to get the F-keys at the top in the sorted list (it's in ij.plugin.CommandLister.java, line 57). When doing a hack like the one we are discussing here, one may easily run into such problems; that's why I thought the other method with macro sets would be nicer...
For adding a shortcut, you have to run("Refresh Menus") after deleting the old one and *before* adding the new one.
And you might want a run("Close") after list = getInfo("window.contents"); otherwise the 'Keyboard Shortcuts' window will stay on the screen forever.
Michael (not Peter ;-)
}
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html