Got xpad working in menus
Posted: Fri Apr 29, 2005 3:03 am
In my unsucessful quest to get mythgame to work I have gotten the xpad to work in the mythv menus, doesn't work in mythgame or watching a movie, just the menus and mythweather, mythnews, mythbrowser, I haven't tested it with mythmusic or mythgallery, but better than nothing, and it took me a hell of a lot of time to figure out how to map the right axes to the right things, I've pretty much mapped everything to the basic right, left, up, down, enter, escape, cause there aren't really any other things you can do in the menu, there are plenty of keymappings if only it worked in things other than the menu, but oh well. Also one small weird bug, if you startup with a single controller in the first port all is okay, but if you have a controller plugged into port 1 and port 2, port one becomes /dev/js1 and port2 becomes /dev/js0 so you would have to use controller # 2 instead of controller # 1 to navigate the menu. Here's what you have to do since joystick support is only available in mythtv 0.17 and higher.
edit /etc/portage/package.keywords with nano or something, I didn't feel like typing out all the echo "foo-0.17 ~x86" >> /etc/portage/package.keywords commands here so I'm just cutting and pasting mine here.
I know ther's that lirc dependency issue thing, but I don't remember having problems with it since I didn't use emerge -uD.
Paste mine into yours and save it. Heres mine:
It still leaves MCE useless to anyone without either a keyboard or a remote control since one you start to watch a video you would lose control completely and have no way to exit or do anything until the movie is ends. If anyone knows how to configure it to work in mythgame and more importantly in mythvideo and mythdvd please post your config files and stuff. Ok while I'm writing this I just thought of how to fix that little xpad1 xpad2 switch duh, what was I thinking. I should just be able to create a sybolic link to /dev/input/js0 and /dev/input/js1 and change the config file to point to the sybolic link, like how /dev/input/mice points you to /dev/input/mouse0 and 1 and so on.
ok that didn't work. I checked and mice seems to be a device file not actually a symbolic link to the other mice. I don't know how to create a device file like mice so If anyone else knows post that too.
Code: Select all
emerge sync
Code: Select all
=media-tv/mythtv-0.17-r1 ~x86
=media-plugins/mythbrowser-0.17 ~x86
=media-plugins/mythdvd-0.17 ~x86
=media-plugins/mythgallery-0.17-r1 ~x86
=media-plugins/mythgame-0.17 ~x86
=media-plugins/mythmusic-0.17-r2 ~x86
=media-plugins/mythnews-0.17 ~x86
=media-plugins/mythvideo-0.17 ~x86
=media-plugins/mythweather-0.17 ~x86
Code: Select all
emerge mythtv && emerge mythbrowser mythdvd mythgallery mythgame mythmusic mythnews mythvideo mythweather
Code: Select all
nano -w /media/.mythtv/joystickmenurc
Code: Select all
# ~/.mythtv/joystickmenurc
# Joystick menu config file
# Place in /media/.mythtv/
#
# Format:
# devicename <devname> Specify name of joystick device to use
# (e.g. /dev/js0)
# button num keystring Send 'keystring' when button 'num' is released
# chord cnum bnum keystring If button cnum is down, and button 'bnum'
# is released, send keystring
# axis num from to keystring If axis num goes into the range of from-to
# send keystring
devicename /dev/input/js0
#A button
button 0 Space
#B button
button 1 Escape
#Y button for ripping dvd
button 4 0
#X button for cancelling rip
button 3 9
#Didn't configure the rest of the buttons 2-9 I couldn't think of any use for them while in the menu
#chord 2 5 Escape
#Left Analog stick
axis 0 -32767 -15000 Left
axis 0 15000 32767 Right
axis 1 -32767 -15000 Down
axis 1 15000 32767 Up
#Right Analog stick
axis 3 -32767 -15000 Left
axis 3 15000 32767 Right
axis 4 -32767 -15000 Down
axis 4 15000 32767 Up
#Left trigger release
#axis 2 -32767 -15000 Up
#Left trigger pull
axis 2 15000 32767 Page Up
#Right trigger release
#axis 5 -32767 -15000 Down
#Right trigger pull
axis 5 15000 32767 Page Down
#Directional Pad
axis 6 -32767 -15000 Left
axis 6 15000 32767 Right
axis 7 -32767 -15000 Down
axis 7 15000 32767 Up
Code: Select all
ln -s "/dev/input/js0 /dev/input/js1" /dev/input/xpads