[vtkusers] Grab Alt key once again.
Mengda Wu
wumengda at gmail.com
Mon Sep 16 16:11:26 EDT 2013
Hi Bill,
Here is the patch to QVTKInteractorAdapter.cxx (from VTK5.10.1). I found
we can just properly add SetAltKey() without modifying the interface of
SetEventInformation(). I tested on my machine. It worked well.
Thanks,
Mengda
On Fri, Sep 6, 2013 at 5:49 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
> Can you try this and provide a patch?
>
>
> On Fri, Sep 6, 2013 at 5:45 PM, Mengda Wu <wumengda at gmail.com> wrote:
> > Thanks for your reply!
> > I think the window manager (e.g. menu bar can intercept "Alt" key) may be
> > just one of the reasons.
> >
> > Another reason is found to be in vtkRenderWindowInteractor.cxx/.h. If you
> > search for "AltKey" in the files, you will notice that the variable has
> not
> > been changed anywhere. If you search for "ControlKey", you can see the
> > difference.
> >
> > My suggestion would be to add another variable "alt" in
> > SetEventInformation(). And make "AltKey" really reflects if "alt" key is
> > received by the vtkRenderWindowInteractor. Of course, this will also
> require
> > changes in other locations where this function is called (e.g. in
> > QVTKInteractorAdapter.cxx).
> >
> > Thanks,
> > Mengda
> >
> >
> >
> >
> > On Mon, Sep 2, 2013 at 4:08 PM, Bill Lorensen <bill.lorensen at gmail.com>
> > wrote:
> >>
> >> Your window manager is intercepting the alt click. If you really need
> >> it, then google for a solution on your specific platform.
> >>
> >>
> >> On Mon, Sep 2, 2013 at 3:39 PM, Mengda Wu <wumengda at gmail.com> wrote:
> >> > Hi all,
> >> >
> >> > I have similar problem with Alt key on Windows 7 64 bit machine.
> Does
> >> > anyone know why is that? My guess is the alt key event is not even
> >> > propagated to VTK event handling. The following VTK example page also
> >> > mentioned this issue.
> >> >
> >> > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/ShiftAndControl
> >> >
> >> > Thanks,
> >> > Mengda
> >> >
> >> >
> >> > On Mon, Feb 20, 2012 at 11:57 AM, Jesús Spínola <jspinola at gmail.com>
> >> > wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I want to know when the "Alt" key is pressed so I use
> >> >> vtkRenderWindowInteractor::GetAltKey(), but it seems it only returns
> >> >> true
> >> >> when "AltGr" is pressed. When I press "Alt" key, I always get false.
> >> >> I tested under W7 x64.
> >> >>
> >> >> Is that a bug or should I use another method?
> >> >>
> >> >> Thanks in advance!
> >> >>
> >> >> --
> >> >> Jesús Spínola
> >> >>
> >> >> _______________________________________________
> >> >> 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
> >> >>
> >> >
> >> >
> >> > _______________________________________________
> >> > 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
> >> >
> >>
> >>
> >>
> >> --
> >> Unpaid intern in BillsBasement at noware dot com
> >
> >
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130916/5d509de5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QVTKInteractorAdaptor.patch
Type: application/octet-stream
Size: 1629 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130916/5d509de5/attachment.obj>
More information about the vtkusers
mailing list