[vtk-developers] vtkCarbonRenderWindowInteractor keyboard input is broken

David Gobbi david.gobbi at gmail.com
Fri Dec 11 08:39:52 EST 2009


Hi All,

It looks like the keyboard input for the
vtkCarbonRenderWindowInteractor is badly broken.  I tried capturing
key events and this is what was returned.  The keysym strings are
unterminated, and modifier keys like "Control" etc. don't produce
keysyms at all.

  print repr(iren.GetKeySym()) -> expected 'k'
  'k????byek'

  print repr(iren.GetKeySym()) -> expected 'Control_L'
  ''

Furthermore, the GetShiftKey(), GetControlKey(), and GetAltKey()
methods return raw bit patterns instead of boolean values:

  print iren.GetShiftKey() -> 512
  print iren.GetControlKey() -> 4096

I'm working through the code right now and will post back after I've
committed the fix, but I just thought that I should warn people who
are using this class for keyboard interaction.  Hopefully the Cocoa
version is in better shape.

   David



More information about the vtk-developers mailing list