trapping special keys
K.R.Subramanian
krs at zappa.uncc.edu
Tue May 16 18:20:48 EDT 2000
Well, vtkInteractorStyle is definitely cleaner than the previous
generation of
customizing interaction styles and certainly fine for the simpler cases.
I would encourage you to experiment a bit and if you come up with
some nice solution to this, then we could let the developers of
VTK consider its adoption in a future release.
As to your question, I havent used anything beyond ascii keys, because
I havent had the need (or lacked the time to!) to so far..
-- krs
Benjamin K Cook wrote:
> 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.
> --------------------------------------------------------------------
--
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/20000516/b2469a03/attachment.html>
More information about the vtkusers
mailing list