[vtkusers] ALT key

Rodrigo Valiña Gutiérrez rodrigo.valina at usc.es
Tue May 18 12:39:07 EDT 2010


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?



More information about the vtkusers mailing list