[vtk-developers] vtkCarbonRenderWindowInteractor keyboard input is broken

David Gobbi david.gobbi at gmail.com
Fri Dec 11 11:10:00 EST 2009


The keysym strings are compatible between Windows and UNIX (or to
within 99% at least, for example both left & right control return
"Control_L").  So it's only the Mac that is really "different" in that
regard.  And by "different" I mean "broken".

   David


On Fri, Dec 11, 2009 at 9:05 AM, Clinton Stimpson <clinton at elemtech.com> wrote:
>
> I use it, and haven't had problems.  Though, I don't use the keysym strings because I found that to be inconsistent across platforms, and I just check for a non-zero status on the shift/alt/control keys.
>
> But, those fixes would be nice.
>
> Clint
>
> On Dec 11, 2009, at 6:39 AM, David Gobbi wrote:
>
>> 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
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
>
>



More information about the vtk-developers mailing list