<div dir="ltr"><div><div><div>Hi Bill,<br><br></div>   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.<br>
<br></div>Thanks,<br></div>Mengda<br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 5:49 PM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you try this and provide a patch?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Fri, Sep 6, 2013 at 5:45 PM, Mengda Wu &lt;<a href="mailto:wumengda@gmail.com">wumengda@gmail.com</a>&gt; wrote:<br>
&gt; Thanks for your reply!<br>
&gt; I think the window manager (e.g. menu bar can intercept &quot;Alt&quot; key) may be<br>
&gt; just one of the reasons.<br>
&gt;<br>
&gt; Another reason is found to be in vtkRenderWindowInteractor.cxx/.h. If you<br>
&gt; search for &quot;AltKey&quot; in the files, you will notice that the variable has not<br>
&gt; been changed anywhere. If you search for &quot;ControlKey&quot;, you can see the<br>
&gt; difference.<br>
&gt;<br>
&gt; My suggestion would be to add another variable &quot;alt&quot; in<br>
&gt; SetEventInformation(). And make &quot;AltKey&quot; really reflects if &quot;alt&quot; key is<br>
&gt; received by the vtkRenderWindowInteractor. Of course, this will also require<br>
&gt; changes in other locations where this function is called (e.g. in<br>
&gt; QVTKInteractorAdapter.cxx).<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Mengda<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Sep 2, 2013 at 4:08 PM, Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Your window manager is intercepting the alt click. If you really need<br>
&gt;&gt; it, then google for a solution on your specific platform.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Sep 2, 2013 at 3:39 PM, Mengda Wu &lt;<a href="mailto:wumengda@gmail.com">wumengda@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi all,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;    I have similar problem with Alt key on Windows 7 64 bit machine. Does<br>
&gt;&gt; &gt; anyone know why is that? My guess is the alt key event is not even<br>
&gt;&gt; &gt; propagated to VTK event handling. The following VTK example page also<br>
&gt;&gt; &gt; mentioned this issue.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/ShiftAndControl" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/ShiftAndControl</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks,<br>
&gt;&gt; &gt; Mengda<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Mon, Feb 20, 2012 at 11:57 AM, Jesús Spí­nola &lt;<a href="mailto:jspinola@gmail.com">jspinola@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Hi,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I want to know when the &quot;Alt&quot; key is pressed so I use<br>
&gt;&gt; &gt;&gt; vtkRenderWindowInteractor::GetAltKey(), but it seems it only returns<br>
&gt;&gt; &gt;&gt; true<br>
&gt;&gt; &gt;&gt; when &quot;AltGr&quot; is pressed. When I press &quot;Alt&quot; key, I always get false.<br>
&gt;&gt; &gt;&gt; I tested under W7 x64.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Is that a bug or should I use another method?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thanks in advance!<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Jesús Spínola<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt;&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt;&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Unpaid intern in BillsBasement at noware dot com<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</div></div></blockquote></div><br></div>