Login  Register

Re: controlKeyDown within macro

Posted by CARL Philippe (LBP) on Mar 26, 2019; 8:21pm
URL: http://imagej.273.s1.nabble.com/controlKeyDown-within-macro-tp5021932p5021935.html

Dear Wayne,
Thanks a lot for your fast and efficient implementation.
Kindest regards,
Philippe

Le Mardi 26 Mars 2019 18:11 CET, Wayne Rasband <[hidden email]> a écrit:

> > On Mar 26, 2019, at 6:33 AM, Philippe CARL <[hidden email]> wrote:
> >
> > Dear all,
> >
> > Is there a reason why the macro methods "isKeyDown(key)" and/or
> > "setKeyDown(keys)" are only applying for the "shift", "alt" or "space" keys
> > and not the "control" one?
>
> The isKeyDown(key) and setKeyDown(keys) macro functions support the control key in the latest daily build (1.52o4).
>
> Use this macro to test isKeyDown():
>
>   print("\nClose Log window to abort");
>   setKeyDown("none");
>   while (true) {
>      keys = "Keys down: ";
>      if (isKeyDown("shift")) keys+="shift ";
>      if (isKeyDown("alt")) keys+="alt ";
>      if (isKeyDown("space")) keys+="space ";
>      if (isKeyDown("control")) keys+="control ";
>      print(keys);
>      wait(1000);
>      if (!isOpen("Log")) break;
>   }
>
> -wayne
>
> > I ask this question given especially that there is already the "public
> > static boolean controlKeyDown()" method within the ij.IJ.java file.
> >
> > My best regards,
> >
> > Philippe
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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