Hi I'am not sure my code is up to date but you can give a look at extra/ 4DNav.
The word "add-keyboard-delegate" links keys to actions. Jeff Le 5 avr. 09 à 20:12, Joe Groff a écrit : > > On Apr 5, 2009, at 3:31 AM, Jon Kleiser wrote: > >> Hi, >> >> Thanks for your reply! >> >>>> - Make use of the arrow key events for rotation of the scene >>>> (pitch and >>>> yaw) >>> >>> You need to call define-gestures with an alist mapping keyboard >>> gestures to quotations with effect ( gadget -- ). Grep around for >>> define-gestures, you'll find plenty of examples. >>> >>> Slava >> >> But that doesn't seem to be how it's done in spheres.factor (or in >> demo-support.factor). There's no mention of define-gestures there, >> and yet >> the arrow keys work! How? > > The keyboard and mouse interaction in spheres is factored into the > opengl.demo-support vocabulary, which defines a demo-gadget tuple > class that the spheres gadget inherits from. The bunny demo also > inherits from opengl.demo-support. > > -Joe > > ---------------------------------------------------------------------- > -------- > _______________________________________________ > Factor-talk mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/factor-talk > ------------------------------------------------------------------------------ _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
