<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title></title>
</head>
<body style="font-family:Arial;font-size:14px">
<p>Hello,<br>
<br>
IMHO, the only way to trap a keypress and get the ascii (?) code is to use the event_handler callback of a figure :<br>
<br>
function handler(x,y,ibut)<br>
//<br>
endfunction<br>
<br>
f=gcf();<br>
f.event_handler='handler';<br>
​f.event_handle_enable='on';<br>
<br>
On my computer, I have the following mapping <br>
<br>
left arrow pressed : ibut=37 (released=-37)<br>
up arrow : 38<br>
right arrow 39<br>
down arrow 40<br>
<br>
The problem is that you need to have a figure opened, and that this figure must have the focus.<br>
<br>
S.</p>
<p>Jens <<a href="mailto:j.s.strom@hslmg.de">j.s.strom@hslmg.de</a>> a écrit :</p>
<blockquote style="border-left:2px solid blue;margin-left:2px;padding-left:12px;" type="cite">
<p>Hi Samuel,<br>
ASCII representation of up, down etc. would help me if I knew a Scilab<br>
command which puts the ascii value into a variable. input() is definitely<br>
unable to do so.<br>
<br>
Jens<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031026.html" target="_blank">http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031026.html</a><br>
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab">users@lists.scilab</a>.<a href="orghttp://lists.scilab.org/mailman/listinfo/users" target="_blank">orghttp://lists.scilab.org/mailman/listinfo/users</a></p>
</blockquote>
<p><br>
<br></p>
</body>
</html>