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?

Ive tried adding this to events.py:
K_KP_2     :'n_0'
or
K_KP_2     :'UP'  # i want 2 to be same as UP arrow key

i get an error like this:
[EMAIL PROTECTED] freevo-1.4.1]# ./freevo
Traceback (most recent call last):
File "./src/main.py", line 82, in ?
import mmpython
File "/opt/freevo-1.4.1/runtime/lib/python2.3/site-packages/mmpython/__init__.py", line 101, in ?
import disc.dvdinfo
File "/opt/freevo-1.4.1/runtime/lib/python2.3/site-packages/mmpython/disc/dvdinfo.py", line 35, in ?
import config
File "/opt/freevo-1.4.1/src/config.py", line 432, in ?
execfile(os.environ['FREEVO_CONFIG'], globals(), locals())
File "./freevo_config.py", line 100, in ?
import plugin
File "/opt/freevo-1.4.1/src/plugin.py", line 69, in ?
from event import Event
File "/opt/freevo-1.4.1/src/event.py", line 482, in ?
DEFAULT_KEYMAP = {
NameError: name 'K_KP_2' is not defined


I can get freevo to use the 2(K_2) and 8(K_8) as UP and DOWN, but this is only for the numeric keys bundled with the main keys on the keyboard, not the keypad ones.

So there must be somewhere else freevo/python defines its keys as K_1 K_A etc. where can i edit/over-ride this? how can i tell freevo that scancode X is now K_KP_2 or even change the K_2 definition to a new scancode (like the keypad numbers instead)?

any help/hints/ideas would be welcomed!!

cheers and beers,

rohbags
([EMAIL PROTECTED])

_________________________________________________________________
Protect your inbox from harmful viruses with new ninemsn Premium. Go to http://ninemsn.com.au/premium/landing.asp?banner=emailtag&referrer=hotmail




-------------------------------------------------------
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