Hi Gabor, >as i was thinking more about it, the proper name would be (key-released-this-frame), which would not be much better the using (key-pressed-this-frame). >have you tried this? of course, it resends the key if when the key repeat occurs, but the toggle switch behaviour could work with it.
Yes, I tried (key-pressed-this-frame) but, as I was receiving #t in frames in which the key was not pressed for the first time, the play/pause behavior was not working properly (i.e. I could not avoid the key repeat). Regards, Carlos -----Original Message----- From: gabor papp [mailto:[email protected]] Sent: viernes, 08 de junio de 2012 14:03 To: Carlos Alegria Cc: 'gabor papp'; 'Kassen'; 'Fluxus' Subject: RE: [Fluxus] Key events > > Yes I am using fluxus from the Git repository. To have that included > would be great!!, and indeed, more general solution (and in fact, more > like the solution I was looking for). In fact I think it would be > great to have an as i was thinking more about it, the proper name would be (key-released-this-frame), which would not be much better the using (key-pressed-this-frame). have you tried this? of course, it resends the key if when the key repeat occurs, but the toggle switch behaviour could work with it. (define toggle #f) (define (render) (when (key-pressed-this-frame " ") (set! toggle (not toggle))) (when toggle ...)) your solution is better in a way, because it's irrespective of the keyboard-repeat. > OpenGL-like list of keys, each one for key-down, key-pressed, and > key-release events. we have (keys-down) which returns a list of keys currently pressed down. we can add (keys-pressed-this-frame) and (keys-released-this-frame), although i'm not sure if these would be very helpful. > programming. I hope to be able to contribute to Fluxus code soon with > this kind of features. great. looking forward to your contributions. best, gabor
