[vtkusers] Blocking 'Q' and 'E' keys
Shashwath T.R.
trshash at gmail.com
Tue Feb 24 04:22:27 EST 2009
Hi Nick,
On Sun, Feb 22, 2009 at 3:00 AM, Nick Gnedin <gnedin at fnal.gov> wrote:
> Here is a snippet from vtkRenderWindowInteractor.cpp. I think if you
> have an empty observer for vtkCommand::ExitEvent, the application
> would not terminate.
>
>
> void vtkRenderWindowInteractor::ExitCallback()
> {
> if (this->HasObserver(vtkCommand::ExitEvent))
> {
> this->InvokeEvent(vtkCommand::ExitEvent,NULL);
> }
> else
> {
> this->TerminateApp();
> }
> }
>
This should work, but my method will also work for other keystrokes. For
example, if you don't want the pick event to be called, you just abort the
command when 'P' is detected in CharEvent.
Regards,
Shash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090224/10037777/attachment.htm>
More information about the vtkusers
mailing list