Keyboard listeners...

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

Keyboard listeners...

Jeffrey B. Woodward
How is the best way to remove the default keyboard listeners on the
image canvas/window when constructing an ImageJ plugin?

Many thanks,

-Woody
Reply | Threaded
Open this post in threaded view
|

Re: Keyboard listeners...

Nick Mortimer
Hmm...

I think you want to override the IJ keyboard commands?

I'm my case I have a custom canvas which implements it's own Key
listener

In the constructor I have the following lines

super.removeKeyListener(IJ.getInstance());
super.addKeyListener(this);


or is you have a imagecanvas called ic

ic.removeKeyListener(IJ.getInstance());
ic.addKeyListener(this);

Hope this helps

Nick