Assistance in how to change a shortcut

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Assistance in how to change a shortcut

Isaac Faraday
Hello all,

I have a question that follows up on the one asked at
http://imagej.1557.x6.nabble.com/keyboard-shortcut-for-next-Z-slice-in-3-channel-hyperstack-td3692508.html

I would like to navigate through the hyperstack frames with a DIFFERENT
shortcut.  I know I can use "alt+>", but this is cumbersome on my keyboard
layout.  Instead, I would like to use the "z" and "x" keys, or the scroller
on the mouse, or something else involving just one key/button.

I have tried to teach myself a solution with the userguide
(https://imagej.nih.gov/ij/docs/guide/146-31.html#sub:Shortcuts), but I
couldn't locate the correct command.  I also tried experimenting with macros
(https://imagej.nih.gov/ij/docs/guide/146-35.html), but when I performed the
"Next hyperstack frame" command, it was recorded into the macro window as
"run("Next Slice [>]");" (i.e. > instead of alt+>").

Do you have any suggestions for how to create a simpler shortcut?  Or maybe
reverse the > and alt+> shortcuts?  Thank you



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Assistance in how to change a shortcut

Wayne Rasband-2
> On Mar 15, 2019, at 1:23 AM, Isaac Faraday <[hidden email]> wrote:
>
> Hello all,
>
> I have a question that follows up on the one asked at
> http://imagej.1557.x6.nabble.com/keyboard-shortcut-for-next-Z-slice-in-3-channel-hyperstack-td3692508.html
>
> I would like to navigate through the hyperstack frames with a DIFFERENT
> shortcut.  I know I can use "alt+>", but this is cumbersome on my keyboard
> layout.  Instead, I would like to use the "z" and "x" keys, or the scroller
> on the mouse, or something else involving just one key/button.

You can create "z" and “x” shortcuts for "previous slice” and "next slice” by adding the following two macro to the Startup Macros file (Plugins>Macros>Startup Macros).

-wayne

  macro "Previous Slice [z]" {
     Stack.getPosition(channel, slice, frame);
     Stack.setSlice(slice-1);
  }

  macro "Next Slice [x]" {
     Stack.getPosition(channel, slice, frame);
     Stack.setSlice(slice+1);
  }


> I have tried to teach myself a solution with the userguide
> (https://imagej.nih.gov/ij/docs/guide/146-31.html#sub:Shortcuts), but I
> couldn't locate the correct command.  I also tried experimenting with macros
> (https://imagej.nih.gov/ij/docs/guide/146-35.html), but when I performed the
> "Next hyperstack frame" command, it was recorded into the macro window as
> "run("Next Slice [>]");" (i.e. > instead of alt+>").
>
> Do you have any suggestions for how to create a simpler shortcut?  Or maybe
> reverse the > and alt+> shortcuts?  Thank you

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html