[vtkusers] Removing keyboard shortcut for the letter 'r'

Alex Malyushytskyy alexmalvtk at gmail.com
Wed Dec 28 19:20:30 EST 2011


I normally subclass vtkInteractorStyle or one of its subclasses to
handle events I need how I need.
I think this is recommended way.

Alex


On Wed, Dec 28, 2011 at 2:14 PM,  <delicasso at netscape.net> wrote:
> Hi,
>
> I am trying to remove the Keypress event (ultimately the keyboard shortcut)
> for the letter 'r'.
>
> It is one of the keys that are active by default - and pushing it resets the
> camera along the current view direction. However, in the version of vtk that
> I am using (5.2.1), this causes strange behavior.  Specifically: After
> hitting the r key, the image resizes. After that, when you click on the
> image with the left mouse key, the image is no longer visible. Finally, we
> never use the r key, but it often causes problems when it is hit by
> accident, which is often - as we frequently use the 'e' key. For all these
> reasons we want to remove it.
>
> I searched the web and found that it should be easy to do this using the
> RemoveObserver (or is it RemoveObservers) function on the Interactor, and
> found examples for the LeftButtonPressEvent.
>
> My question is what string (or event) should go in this method call for the
> Keypress-r event?
> I tried what are thought were the obvious possibilities but no luck.
>
> As a side note, what is the difference between RemoveObservers and
> RemoveObserver (without the 's')?
> I seem to see references to both when I search the web on this subject.
>
> FYI: I am also new to VTK.
>
> Thanks in advance for you help.
>
> Cheers, David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list