Login  Register

Keyboard listeners...

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

Keyboard listeners...

Jeffrey B. Woodward
30 posts
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
| More
Print post
Permalink

Re: Keyboard listeners...

Nick Mortimer
11 posts
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