[vtkusers] Keyboard and mouse interaction on OSX

Sean McBride sean at rogue-research.com
Fri Mar 15 14:46:21 EDT 2013


On Fri, 15 Mar 2013 10:40:44 -0400, Xavier Tricoche said:

>I'd be curious to know the status of the keyboard and mouse interaction
>support in VTK on OSX. Basically my experience has been that many
>widgets don't work properly on macs (vtkSliderWidget is one notable
>exception) and that keyboard events (caught, e.g., through proper
>observers) are never passed on. 

There is some info here:
<http://vtk.org/Bug/view.php?id=2025>

The thing is, the Cocoa framework basically requires that displaying an NSWindow be done from a bundled app.

>I remember reading on the Wiki that a solution to this problem (a
>workaround, rather) was to create bundled apps but that does not apply
>to programs with command line options or python scripts.

Actually, you can pass command line options to bundled apps.

But for python scripts... hmmmm

>I am using VTK (5.10.1) in my graduate visualization class (I have been
>for a while) and the increasing popularity of both macs and python among
>my students make that a pretty distracting issue from a logistical
>standpoint. Some students have to run VTK on a Linux virtual machine to
>complete projects on their macs.
>
>Hence, I'd be most thankful for any information I can obtain as to what
>is causing these issues and whether there are concrete plans to address them. 

As it says in the bug, one hope is the TransformProcessType() API.  I haven't had to chance to try, but if you could that'd be great.  Basically, you'd need to call TransformProcessType() in VTK, somewhere around where the NSWindow is created.

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtkusers mailing list