[vtkusers] SetCallbackMethod, add new keyPressEvent
Minsuk Park
ashtonpark7 at gmail.com
Mon Feb 19 05:26:31 EST 2018
Hi!
I'm pretty much beginner of vtk and its application.
I applied vtkContourWidget on renderWindow and hope to add a new
keyPressEvent on it.
So I am now trying to change the vtkContourWidget.cxx file directly and add
*this->CallbackMapper->SetCallbackMethod(vtkCommand::KeyPressEvent,*
* vtkEvent::NoModifier, 13, 1, "Return",*
* vtkWidgetEvent::Reset,*
* this, vtkContourWidget::ResetAction);*
this for new Action when I pressed Return(I guess it is "Enter"), which
acts ResetAction when Shift+Del is pressed like behind
*this->CallbackMapper->SetCallbackMethod(vtkCommand::KeyPressEvent,*
* vtkEvent::ShiftModifier, 127, 1,
"Delete",*
* vtkWidgetEvent::Reset,*
* this,
vtkContourWidget::ResetAction);*
However, "Return" doesn't work and I couldn't figure it out.
I am pretty much sure that I am not supposed to add the keyPressEvent in
this way,
but I don't know what to do.
How can I add a new keyPressEvent for a new key on vtkWidget?
--
------------------------------------------------------------
--------------------------------------------------
*Minsuk Park*
Mobile: +82-10-7329-9912
Email: ashtonpark7 at gmail.com
------------------------------------------------------------
--------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180219/8a2c1be6/attachment.html>
More information about the vtkusers
mailing list