Thank you very much Denis.<br><br>The answer is :<br><br><br><br><span style="font-family: courier new,monospace;">std::string key_sym (interactor-&gt;GetKeySym());</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp; if ((key_sym.compare(&quot;Up&quot;)==0) || (key_sym.compare(&quot;KP_Up&quot;)==0))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp; </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp; {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // CODE</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp; }</span><br><br><br><br>Have a nice day,<br><br><br>Stéphane<br><br><br><br><br><div class="gmail_quote">2008/11/13 Denis Barbier <span dir="ltr">&lt;<a href="mailto:bouzim@gmail.com">bouzim@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On 2008/11/13 Stéphane CALANDE wrote:<br>
&gt; Hi vtk-list,<br>
&gt;<br>
&gt; I have a question about vtkRenderWindow.<br>
&gt;<br>
&gt; I don&#39;t manage to catch the hits of arrow keys.<br>
</div>[...]<br>
<div class="Ih2E3d">&gt; if (event == vtkCommand::KeyPressEvent)<br>
&gt; &nbsp; &nbsp; &nbsp; {<br>
&gt; &nbsp; &nbsp; &nbsp; int code = ????<br>
<br>
&gt; &nbsp; &nbsp; &nbsp; if ( code == ????(LEFT_ARROW) )<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// CODE<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
</div>[...]<br>
<br>
You can set DebugOn on your vtkRenderWindowInteractor to print some useful<br>
information. vtkRenderWindowInteractor::GetKeyCode returns a char, so it won&#39;t<br>
help. &nbsp;I guess that you could use GetKeySym instead and check for<br>
Left/Right/Up/Down.<br>
After quickly browsing source files, I believe that these strings are<br>
platform agnostic,<br>
but you will have to check if portability is an issue for you.<br>
<font color="#888888"><br>
Denis<br>
</font></blockquote></div><br>