Re: flags in getCursorLoc
Posted by Wayne Rasband on Feb 03, 2006; 9:07pm
URL: http://imagej.273.s1.nabble.com/flags-in-getCursorLoc-tp3703823p3703824.html
> I'm trying to use the getCursorLoc(x,y,z,flags) function to
> individuate some location in the image, differentiating between left
> click and leftclick+shift; however, something strange occurs, as when
> I left click, I obtain a flag=16, while if I just press shift without
> clicking, I obtain 17. Furtermore, after 17 remains still in the pipe
> even if I release the shift key.
> Any idea?
ImageJ 1.35q, due in a few weeks, fixes a bug in the getCursorLoc()
macro function that caused it to not update the flags when the mouse
button was pressed or released without the mouse having been moved. A
more reliable way to check the state of the modifier keys is to use
isKeyDown("shift") and isKeyDown("alt").
-wayne