Kent:<br><br>Thanks. The patch has been committed.<br><br>/cvsroot/VTK/VTK/Widgets/vtkContourWidget.cxx,v  <--  vtkContourWidget.cxx<br>new revision: 1.21; previous revision: 1.20<br>/cvsroot/VTK/VTK/Widgets/vtkSeedWidget.cxx,v  <--  
vtkSeedWidget.cxx<br>new revision: 1.11; previous revision: 1.10<br><br>'xev' on unix yields 127 too. <br>    state 0x0, (keysym 0xffff, Delete), same_screen YES,<br>    XLookupString gives 1 bytes: (7f)<br><br>7f = 127.
<br><br>I'm not sure why "47" was used instead. Maybe they were looking at the VirtualKeyCodeToKeySymTable instead of the ASCIIKeyCodeToKeySym table in Win32RenderWindowInteractor.<br><br>Thanks<br>--<br>karthik
<br><br><br><div><span class="gmail_quote">On 12/18/07, <b class="gmail_sendername">kent williams</b> <<a href="mailto:nkwmailinglists@gmail.com">nkwmailinglists@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
OK, here's what I think needs to happen, patch to follow.<br><br>The keycode for delete is the ASCII code for the DEL symbol, 127.  And<br>if you set a callback for both vtkCommand::KeyPressEvent and<br>vtkCommand::CharEvent, the callback gets called twice.
<br><br>With this change, pressing the 'delete' key works as the<br>vtkContourWidget Doxygen man page describes. Setting a decimal Keycode<br>of 47 would seem to specify a forward slash rather than the delete<br>key.
<br><br>cvs diff: Diffing .<br>Index: vtkContourWidget.cxx<br>===================================================================<br>RCS file: /cvsroot/VTK/VTK/Widgets/vtkContourWidget.cxx,v<br>retrieving revision 1.20<br>
diff -c -r1.20 vtkContourWidget.cxx<br>*** vtkContourWidget.cxx        18 Dec 2007 16:07:02 -0000      1.20<br>--- vtkContourWidget.cxx        18 Dec 2007 22:16:22 -0000<br>***************<br>*** 52,64 ****<br>                                            vtkWidgetEvent::EndSelect,
<br>                                            this,<br>vtkContourWidget::EndSelectAction);<br>    this->CallbackMapper->SetCallbackMethod(vtkCommand::KeyPressEvent,<br>!                                           vtkEvent::NoModifier, 47,
<br>1, "Delete",<br>!                                           vtkWidgetEvent::Delete,<br>!                                           this,<br>vtkContourWidget::DeleteAction);<br>!   this->CallbackMapper->SetCallbackMethod(vtkCommand::CharEvent,
<br>!                                           vtkEvent::NoModifier, 47,<br>1, "Delete",<br>                                            vtkWidgetEvent::Delete,<br>                                            this,
<br>vtkContourWidget::DeleteAction);<br><br>    this->CreateDefaultRepresentation();<br><br>--- 52,64 ----<br>                                            vtkWidgetEvent::EndSelect,<br>                                            this,
<br>vtkContourWidget::EndSelectAction);<br>    this->CallbackMapper->SetCallbackMethod(vtkCommand::KeyPressEvent,<br>!                                           vtkEvent::NoModifier, 127,<br>1, "Delete",<br>
                                            vtkWidgetEvent::Delete,<br>                                            this,<br>vtkContourWidget::DeleteAction);<br>+ //   this->CallbackMapper->SetCallbackMethod(vtkCommand::CharEvent,
<br>+ //                                           vtkEvent::NoModifier,<br>127, 1, "Delete",<br>+ //                                           vtkWidgetEvent::Delete,<br>+ //                                           this,
<br>vtkContourWidget::DeleteAction);<br><br>    this->CreateDefaultRepresentation();<br><br><br><br>On Dec 18, 2007 3:26 PM, kent williams <<a href="mailto:nkwmailinglists@gmail.com">nkwmailinglists@gmail.com</a>> wrote:
<br>> What I notice now is that there is no key combination that invokes the<br>> Delete event handler for the Contour widget.<br>><br>><br>> On Dec 18, 2007 10:08 AM, Karthik Krishnan <<a href="mailto:karthik.krishnan@kitware.com">
karthik.krishnan@kitware.com</a>> wrote:<br>> ><br>> ><br>> ><br>> > On 12/17/07, kent williams <<a href="mailto:nkwmailinglists@gmail.com">nkwmailinglists@gmail.com</a>> wrote:<br>> > > Also, the Delete Point binding is really strange.  In the CVS version
<br>> > > of the widget, hitting 'Ctrl', 'Shift', and on Mac, the CloverLeaf Key<br>> > > deletes the last point during contour definition, and the currently<br>> > > selected point after a contour is closed.  This appears to be a bug,
<br>> > > since the Doxygen documentation says that the 'Delete' key is bound to<br>> > > this action.<br>> ><br>> > This is fixed. Please update the repository and you shouldn't notice these
<br>> > issues.<br>> ><br>> > Thanks<br>> > --<br>> > k<br></blockquote></div>