[vtkusers] add keypress event in vtkSeedWidget

Erkang Cheng ekyaya at gmail.com
Tue Dec 16 20:09:11 EST 2014

Hi all,

I am playing with the vtkSeedWidget example, which is available from:

I am stuck at how to add kepress event.

I tried to add

right after the following lines:

 Another change is in class vtkSeedCallback::Execute
I add one if-else blcok to capture keypress event.

virtual void Execute(vtkObject*, unsigned long event, void *calldata)
      if (event == vtkCommand::KeyPressEvent)
          std::cout<<"key press"<<std::endl;



However, the widget can not capture keypress event.

Could anyone share the idea to add customized event in vtkSeedWidget?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141216/11acefd9/attachment.html>

More information about the vtkusers mailing list