keyboard events

K.R.Subramanian krs at zappa.uncc.edu
Sat Mar 4 19:26:19 EST 2000


Liz:

You should be ready to look at some vtk source code..

Its not too bad. Take a look at vtkXRenderWindowInteractor first, in
particular the
functions Enable() and Disable () that set up and remove the event
handler (you
will need to do that to change the events that are used in the default
interactor),
and vtkXRenderWindowInteractorCallback(), which contains the event
loop.  The KeyPress
event is what you need to mess with, which calls the OnChar method.

Now go into an example InteractorStyle, such as
vtkInteractorStyleTrackball, which
defines the interactions with the trackball model; look at the OnChar
function (virtual,
will be defined for each device using the keyboard).

If you are on Windows, then you should find the
vtkWin32RenderWindowInteractor instead.

Hope this helps.

    -- krs




--
K.R.Subramanian                           Phone: (704) 547-4872
Department of Computer Science            FAX:   (704) 547-3516
UNC Charlotte, 228A Kennedy
9201 Univ. City Blvd.                     Email: krs at cs.uncc.edu
Charlotte, NC 28223-0001                  WWW: http://www.cs.uncc.edu/~krs


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20000304/810cc28e/attachment.html>


More information about the vtkusers mailing list