<div dir="ltr">Yes. You described the issue very precise.<div style>And it would be enough to catch presses occured between frames in a way like keyboard interface do.</div><div style>I'm not an expert in Scheme/Racket, especially in its objective part. But I see that native events are handled in canvas definition. Then they go to fluxus-input-callback. So I wonder is it possible to redefine it from my code?</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/20 Kassen <span dir="ltr"><<a href="mailto:signal.automatique@gmail.com" target="_blank">signal.automatique@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Mar 20, 2013 at 04:39:09PM +0400, Ivan Youroff wrote:<br>
>    Hello there!<br>
>    I checked documentation and reference, and haven't found any natural way<br>
>    to implement mouse event handler. Fluxus manual suggests to handle it in<br>
>    every-frame loop using states of (mouse-button). I thinks it's possible to<br>
>    get the switch moment keeping the state from prevous frame, but it will<br>
>    definitely skip short touches (with apple's trackpad for example).<br>
>    Is there any simple way to write the callback for exact events like<br>
>    button-down/button-up?<br>
<br>
This sounds a bit similar to the problem I had with MIDI; quantising<br>
all analysis of the clock to the frame-rate would give considerable<br>
jitter when trying to figure out the BPM. I went into the C++ code<br>
dealing with incoming MIDI and time-stamped the events there. I<br>
imagine something like that will be needed here, it depends a bit on<br>
what you need. I can see how if this would happen;<br>
-frame tick<br>
-button down<br>
-button up<br>
-frame tick<br>
....you'd miss the button event. A "button-down-since-last-frame"<br>
would cure that. The keyboard interface has it, maybe the mouse lacks<br>
it. I wonder whether that would be enough. It sounds a bit like what<br>
you want would be more like linking buttons to functions that would<br>
-at a event- be called with -say- the current mouse cursor location as<br>
a parameter. That would be more powerful but considerably harder, I<br>
don't think we have anything like that right now. Without something<br>
like that I don't see how we'll keep awareness of the mouse cursor's<br>
location at the moment of a button-down event; clearly that is likely<br>
important information.<br>
<br>
Interesting issue.<br>
<br>
Yours,<br>
Kas.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Kind regards,<div>Ivan Youroff</div>
</div>