flags in getCursorLoc

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

flags in getCursorLoc

Vincenzo Della Mea
Dear all,
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?

Thanks,
Vincenzo
------------------------------------------------------------------------
------------------------
-----------------------------  Vincenzo Della Mea, PhD  
------------------------------
------------ Medical Informatics, Telemedicine and e-health Lab  
------------
Dept. of Mathematics and Computer Science - University of Udine, Italy
-----------------------  http://www.dimi.uniud.it/dellamea/ 
-------------------------
------------------------------- http://mitel.dimi.uniud.it 
---------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: flags in getCursorLoc

Wayne Rasband
> 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