A short description on how to setup freevo using your remote via the linux event device. Off-course it has to be supported by the kernel driver your using, if not you have to fall back to lirc.
First download some tools: http://dl.bytesex.org/cvs-snapshots/input-20040421-115547.tar.gz
Unpack it and build it:
tar -xvzf input-20040421-115547.tar.gz rm input-20040421-115547.tar.gz cd input/ make -f GNUmakefile
Now all needed tools are build but you need a development kit to do this, gcc, make, kernel headers and that sort of stuff... From within that directory we try to see if your device is supported:
Mine is showing:
/dev/input/event0 bustype : BUS_PCI vendor : 0x70 product : 0x9202 version : 1 name : "cx88 IR (Hauppauge Nova-S-Plus " phys : "pci-0000:00:0a.0/ir0" bits ev : EV_SYN EV_KEY EV_REP
Cool, I have my remote on /dev/input/event0 now lets see if I can read the key codes:
The 0 stands for the device your monitoring, so if your remote is on event4 you need to put in a 4 there...
With this you can read every code on your remote and use it directly in local_conf.py, something like this:
EVENTMAP['KEY_TV'] = 'TV'
The KEY_TV is the code my remote sends if I press the tv button and TV is the freevo command to show the tv menu, pretty simple. If all is working you can remove the lirc entry from local_conf.py completely and even uninstall pylirc. In my config I also disabled the keyboard, added some extra entry's to open some menus directly and added mplayer scaling factors to the 1, 2 and 3 buttons:
USE_SDL_KEYBOARD = 0 EVENT_DEVS = [ '/dev/input/event0' ] EVENTMAP['KEY_SELECT'] = 'MENU' EVENTMAP['KEY_TV'] = 'TV' EVENTMAP['KEY_VIDEO'] = 'VIDEOS' EVENTMAP['KEY_AUDIO'] = 'MUSIC' EVENTMAP['KEY_MHP'] = 'PICTURES' EVENTMAP['KEY_EPG'] = 'GUIDE' EVENTMAP['KEY_RADIO'] = 'RADIO' EVENTMAP['KEY_UP'] = 'UP' EVENTMAP['KEY_LEFT'] = 'LEFT' EVENTMAP['KEY_ENTER'] = 'SELECT' EVENTMAP['KEY_RIGHT'] = 'RIGHT' EVENTMAP['KEY_DOWN'] = 'DOWN' EVENTMAP['KEY_EXIT'] = 'EXIT' EVENTMAP['KEY_MENU'] = 'ENTER' EVENTMAP['KEY_PREVIOUS'] = 'PREV_CH' EVENTMAP['KEY_MUTE'] = 'MUTE' EVENTMAP['KEY_VOLUMEUP'] = 'VOL+' EVENTMAP['KEY_VOLUMEDOWN'] = 'VOL-' EVENTMAP['KEY_CHANNELUP'] = 'CH+' EVENTMAP['KEY_CHANNELDOWN'] = 'CH-' EVENTMAP['KEY_RECORD'] = 'REC' EVENTMAP['KEY_STOP'] = 'STOP' EVENTMAP['KEY_REWIND'] = 'REW' EVENTMAP['KEY_PLAY'] = 'PLAY' EVENTMAP['KEY_FASTFORWARD'] = 'FFWD' EVENTMAP['KEY_PAUSE'] = 'PAUSE' EVENTMAP['KEY_1'] = '1' EVENTMAP['KEY_2'] = '2' EVENTMAP['KEY_3'] = '3' EVENTS['menu']['TV'] = Event(MENU_GOTO_TV) EVENTS['menu']['VIDEOS'] = Event(MENU_GOTO_VIDEOS) EVENTS['menu']['MUSIC'] = Event(MENU_GOTO_MUSIC) EVENTS['menu']['PICTURES'] = Event(MENU_GOTO_IMAGES) EVENTS['menu']['RADIO'] = Event(MENU_GOTO_RADIO) EVENTS['menu']['GUIDE'] = Event(MENU_GOTO_TVGUIDE) EVENTS['video']['1'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_ratio 1.33333') EVENTS['video']['2'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_ratio 1.77778') EVENTS['video']['3'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_ratio 2.35')
It's a lot of entry's in the config file but you don't have to run the lirc daemon.
If you want to define your own mplayer events like the ones above you can get a full list of options by running:
mplayer -input cmdlist