[vtkusers] ALT key

Rodrigo Valiña Gutiérrez rodrigo.valina at usc.es
Wed May 19 03:17:05 EDT 2010


Hi,

It does not work.

With Ctrl+Alt, GetAltKey() returns 0. Also it behaves like Ctrl,
rotating around an axis.

I was looking for a key that does not modify the regular behavior
(rotation) of the scene...

--
Rodrigo

2010/5/19 Jérôme <jerome.velut at gmail.com>:
> Hi,
> The Alt key is expected to be triggered along with another key.
> You can try a combination of ctrl+alt.
>
> Jerome
>
> 2010/5/18 Rodrigo Valiña Gutiérrez <rodrigo.valina at usc.es>:
>> Hi,
>>
>> I am using VTK 5.4.2 embedded in Python + wxWidgets
>>
>> I am trying to capture a key that does not modify the left click
>> action by default.
>>
>> I use vtkRenderWindowInteractor and its methods:
>>
>>        a = self.iren.GetAltKey()
>>        c = self.iren.GetControlKey()
>>        s = self.iren.GetShiftKey()
>>        kc = self.iren.GetKeyCode()
>>        ks = self.iren.GetKeySym()
>>
>> CTRL rotates
>> SHIFT displaces
>> ALT is never reported, I think that because, at least in Windows, it
>> triggers a menu event (selects the first menu in the menubar).
>> the KeyCode is always '\x00'
>> the KeySym is always None
>>
>> looking at the code of
>> vtkRenderWindowInteractor::SetEventInformation(), I see that AltKey is
>> never modified.
>>
>> So, is there any other key that I can use to do in my code a custom
>> action when pressing left mouse button?
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>



More information about the vtkusers mailing list