[vtkusers] who 'observes' event?
Amy Henderson
amy.henderson at kitware.com
Wed Jun 2 08:36:20 EDT 2004
Hi AJ,
The Enter event is not for detecting when the Enter key on the keyboard is
pressed. The Enter event is invoked when the mouse pointer enters the
render window. (There is also a Leave event.) To detect when Enter is
pressed, you probably need to watch vtkCommand::KeyPressEvent and add code
yourself for checking whether the key that was pressed is the Enter key.
- Amy
At 10:20 PM 6/1/2004, A J wrote:
>Hi,
>
>regarding the problem of my last post - maybe the problem is I haven't
>added an observer to the correct object
>
>I tried it with
>
> RenWin->AddObserver( vtkCommand::EnterEvent, cbc );
>and Ren-> "
>and Iren-> "
>
>(note that I am calling Iren->Render() to render my scene)
>
>but none of them seem to detect when I press the Enter key on my keyboard..
>
>If I change it to detecting Ren->AddObserver( vtkCommand::ModifiedEvent, cbc)
>Then this works fine
>
>But thats the only one that I can get to work
>Really I would like it to detect when I press Enter!
>
>So if anyone has any insight.. then please englighten me..! =S
>Thank you in advance once again =)
>
>AJ
>
>_________________________________________________________________
>Looking to buy a house? Get informed with the Home Buying Guide from MSN
>House & Home. http://coldwellbanker.msn.com/
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic.
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list