Hello developers,

I am making some modifications/tweaks to Freevo to support the xbox, see xbox-linux.sf.net. While changing the key mappings (the remote control driver emulates keyboard) i noticed that y h and F10 cannot be remapped since they are fixed in osd.py. Of course, the nest solution is to remove these keys hardcoded and put them in a config, but this diff enables users to overrule the default mappings (thus enabling to map y,h and F10 to something else).

Regards,

Rob Reilink



--- osd.py      2003-10-28 19:15:19.000000000 +0100
+++ ../../freevo/src/osd.py     2003-11-23 21:21:47.000000000 +0100
@@ -500,21 +504,21 @@
                return None

if event.type == KEYDOWN:
- if event.key == K_h:
- self._helpscreen()
- elif event.key == K_z:
- self.toggle_fullscreen()
- elif event.key == K_F10:
- # Take a screenshot
- pygame.image.save(self.screen,
+ if event.key in config.KEYMAP.keys():
+ # Turn off the helpscreen if it was on
+ if self._help:
+ self._helpscreen()
+ return config.KEYMAP[event.key]
+
+ elif event.key == K_h:
+ self._helpscreen()
+ elif event.key == K_z:
+ self.toggle_fullscreen()
+ elif event.key == K_F10:
+ # Take a screenshot
+ pygame.image.save(self.screen,
'/tmp/freevo_ss%s.bmp' % self._screenshotnum)
- self._screenshotnum += 1
- elif event.key in config.KEYMAP.keys():
- # Turn off the helpscreen if it was on
- if self._help:
- self._helpscreen()
- return config.KEYMAP[event.key]
-
+ self._screenshotnum += 1


    def shutdown(self):
        """

_________________________________________________________________
Play online games with your friends with MSN Messenger http://messenger.msn.nl/




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to