On Thu, 2005-09-15 at 11:01 +0200, Dirk Meyer wrote: > Why do you poll? From Freevo: > > | fd = pylirc.init('freevo', config.LIRCRC) > | kaa.notifier.SocketDispatcher(self.handle).register(fd) > | pylirc.blocking(0)
No reason except that's how I did it before there was Kaa, and I just moved this code over. Your way is better, of course. I'll fix it soon. I'd like to move some of the keyboard handling code into kaa.input and figure out a decent framework to offer apps to handle events from keyboard (whether it's on the console, or in a kaa.display window), lirc, possibly also mouse and joystick. I'm not entirely sure how this would be abstracted into a unified framework. I actually don't mind the current approach (just using signals), but it could be organized a bit. Instead of stdin_key_press_event signal in the kaa.signals dict, we could create a kaa.input.signals dict and have signals like "keyboard-stdin", "keyboard-x11", "lirc", "joystick", etc. You might have better ideas on how this should work since you've probably already coded something like this for Freevo. :) Jason.
signature.asc
Description: This is a digitally signed message part