"Roh ." wrote:
> Hi guys,
>
> Ive installed a pc in my car, which runs freevo (just a pII 350Mhz but
> runs freevo fine), and uses LIRC and a custom keypad (a keypad from a
> phone wired to a keyboard controller IC as 0-9 "." and "/") to
> interface, the problem is I *NEED* to redefine the keymap in
> events.py. Ive tried many different methods to do this but none work,
> it seems I can only define 'known' keys to freevo, like K_KP_MINUS and
> K_KP_PLUS, how can I define say K_KP_0 -to-
> K_KP_9 , K_KP_FULLSTOP and K_KP_BACKSLASH?

Your problem is on my todo list. I hope I have time to look at it this
weekend.


Dischi



Thanks Dischi,
I did some digging around last night and found my answer, so i thought id reply since it may be of use to you or others on this list.
Since i know barely anything about python (im a perl and C guy myself), i did some googling on pygame.locals, and found the pygame website, they have some good docs there, among the docs i found this page:
http://www.pygame.org/docs/ref/pygame_constants.html#keyboard
which lists all the K_* constants (no wonder i couldnt redefine them!).


i added this to my KEYMAP in event.py:

   K_KP8         : 'UP',
   K_KP2         : 'DOWN',
   K_KP4         : 'LEFT',
   K_KP6         : 'RIGHT',
   K_KP5         : 'SELECT',
   K_KP1         : 'EXIT',
   K_KP3         : 'CH-',
   K_KP7         : 'DISPLAY',
   K_KP9         : 'CH+',
   K_KP_DIVIDE   : 'FFWD',
   K_KP_PERIOD   : 'REW',

and now I can use just the keypad to control all of freevo(that i need anyway) :) ..very cool!
Hope that helps someone!


cheers,
rohbags.

_________________________________________________________________
Personalise your phone with chart ringtones and polyphonics. Go to http://ringtones.com.au/ninemsn/control?page=/ninemsn/main.jsp




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to