trapping special keys
Benjamin K Cook
bcook at mit.edu
Tue May 16 16:54:28 EDT 2000
Hi -
Is anyone else frustrated with the limited
functionality provided by the vtkInteractorStyle::OnChar
method? I'm developing a customized Interactor Style
and would like to trap special keys (arrow, function, etc);
unfortunately, the event handling in vtkWin32RenderWindowInteractor
and vtkXRenderWindowInteractor only captures character key presses.
Yes, there are some workarounds: For instance, in X, I can
remap the arrow keys using xmodmap so that XLookupString in
vtkXRenderWindowInteractor.cxx will return a recognizable
character for my overloaded OnChar method. Alternatively
(and this is what I've done (: ), one can hack the event-handling
code in vtk*RenderWindowInteractor to trap these special keys and
return some char value using an user-defined extended character
set.
Any suggestions for a more general fix? Perhaps a new
method in vtkRenderWindowInteractor to allow users to specify a
list of special keys to trap and a new vtkInteractorStyle::OnKey
method for the interception of these key presses?
Cheers,
Ben Cook
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list