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

delicasso at netscape.net delicasso at netscape.net
Wed Dec 28 17:14:06 EST 2011



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

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111228/d67b9e09/attachment.htm>


More information about the vtkusers mailing list