[vtkusers] OnKeyPress repeating while held down
Matt Schmiermund
matt at plasticflow.com
Wed Jun 2 14:51:06 EDT 2004
I have subclassed vtkInteractorStyleTrackballCamera to
rotate only when 'r' is held down, zoom only when 'z'
is held down, etc.
I overwrote OnKeyPress to determine which key has been
pressed to set a variable to indicate what action a
left mouse click and drag should have. Then when the
key is released it is set back to a default of doing
nothing. My problem is when a key is being held down I
seem to get the OnKeyPress called repeatedly with a
OnKeyRelease for each OnKeyPress call. This interupts
the action that I am trying to perform with the mouse
as the onKeyRelease makes a StopRotate (or StopPan,
etc) call.
Is this behavior expected? Does anyone have any
recomendations on what could be done about this?
I am on Windows XP, vtk 4.2, qt 3.3 using koenig's
vtkqt solution( modified so I can receive the key
release events)
Thanks,
Matt Schmiermund
More information about the vtkusers
mailing list