Grab Alt key once again.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Grab Alt key once again.

Mengda Wu-3
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Grab Alt key once again.

Bill Lorensen
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 <[hidden email]> 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 <[hidden email]> 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
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Grab Alt key once again.

Mengda Wu-3
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Grab Alt key once again.

Mengda Wu-3
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 <[hidden email]> wrote:
Can you try this and provide a patch?


On Fri, Sep 6, 2013 at 5:45 PM, Mengda Wu <[hidden email]> 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 <[hidden email]>
> 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 <[hidden email]> 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 <[hidden email]>
>> > 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


_______________________________________________
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

QVTKInteractorAdaptor.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Grab Alt key once again.

Mengda Wu-3
Hi all,

   I think this issue is still not fixed in the vtk 7.0. Can anyone apply this patch?

Thanks,
Mengda

On Mon, Sep 16, 2013 at 4:11 PM, Mengda Wu <[hidden email]> wrote:
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 <[hidden email]> wrote:
Can you try this and provide a patch?


On Fri, Sep 6, 2013 at 5:45 PM, Mengda Wu <[hidden email]> 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 <[hidden email]>
> 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 <[hidden email]> 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 <[hidden email]>
>> > 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



_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Grab Alt key once again.

Cory Quammen-2
Hi Mengda,

I posted a patch here:


Mind testing it?

Thanks,
Cory

On Fri, Jan 22, 2016 at 1:58 PM, Mengda Wu <[hidden email]> wrote:
Hi all,

   I think this issue is still not fixed in the vtk 7.0. Can anyone apply this patch?

Thanks,
Mengda

On Mon, Sep 16, 2013 at 4:11 PM, Mengda Wu <[hidden email]> wrote:
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 <[hidden email]> wrote:
Can you try this and provide a patch?


On Fri, Sep 6, 2013 at 5:45 PM, Mengda Wu <[hidden email]> 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 <[hidden email]>
> 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 <[hidden email]> 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 <[hidden email]>
>> > 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



_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




--
Cory Quammen
R&D Engineer
Kitware, Inc.

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers