Posted by
Michael Schmid on
Nov 21, 2013; 7:20pm
URL: http://imagej.273.s1.nabble.com/Easy-way-for-modifying-Shortcuts-tp5005571p5005638.html
Hi Philippe,
> On the other hand with the other method you won't see the list of Shortcuts
> showing up in the list, isn't it?
If you have macro sets for defining the shortcuts, at least in my version of ImageJ both the original mapping (if present) and the macro appear in the list of shortcuts.
Macros appear with a caret.
E.g. for shift-B, which I usually replace with a macro of mine, I see in the list
B Blobs (25K)
B ^myBmacro [B]
If there is only a macro, no previous ImageJ assignment of the shortcut, it appears also. Numeric.keypad shortcuts appear in the list with a special character for the keypad (it may be destroyed by the mailer):
⌨ + ^myZoom-InMacro [n+]
The special ⌨ (KEYBOARD) character is Unicode hex 2328.
Again something that might be tricky to handle properly...
In addition, the installed macros appear with their shortcut in Plugins>Macros below 'Record'.
If your macros supersede a shortcut assignment by ImageJ, the original will be back as soon as you install another macro set that does not supersede that shortcut. Compared to redefining shortcuts, I consider this another advantage of the macro approach.
Michael
________________________________________________________________
On Nov 21, 2013, at 17:14, Philippe CARL wrote:
> Hi Michael,
>
>> 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).
>
> Ok thanks a lot for this explanation.
>
>> 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...
>
> On the other hand with the other method you won't see the list of Shortcuts
> showing up in the list, isn't it?
>
>> For adding a shortcut, you have to run("Refresh Menus") after deleting the
> old one and *before* adding the new one.
>
> Actually I had forgotten to precise this, but adding run("Refresh Menus")
> before adding the new one won't do the trick as well and you really need to
> close Fiji for the key deselection to be effective.
>
>> And you might want a run("Close") after list = getInfo("window.contents");
> otherwise the 'Keyboard Shortcuts' window will
>> stay on the screen forever.
>
> Indeed, thanks a lot.
>
>> Michael (not Peter ;-)
>
> Sorry for the mistake.
>
> Best regards,
>
> Philippe
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html