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->GetKeySym());</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> if ((key_sym.compare("Up")==0) || (key_sym.compare("KP_Up")==0))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // CODE</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</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"><<a href="mailto:bouzim@gmail.com">bouzim@gmail.com</a>></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>
> Hi vtk-list,<br>
><br>
> I have a question about vtkRenderWindow.<br>
><br>
> I don't manage to catch the hits of arrow keys.<br>
</div>[...]<br>
<div class="Ih2E3d">> if (event == vtkCommand::KeyPressEvent)<br>
> {<br>
> int code = ????<br>
<br>
> if ( code == ????(LEFT_ARROW) )<br>
> {<br>
> // CODE<br>
> }<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't<br>
help. 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>