Linux ps3 bluetooth joystick-keymap.xml
#1
I am so very nearly there with this config, but one thing is missing:
When I do a cold boot of my Xbmcbuntu Eden system the ps3 sixaxis is not registered as a valid joystick input device for use in xbmc. I have to hit the ps button on the controller then quit and restart xbmc before it works. Grepping the xbmc.log file confirms that xbmc does not see the ps3 controller when it boots initially (because it's turned off), but when the xbmc app is restarted everything is fine: xbmc sees the device is connected and therefore processes the joystick.xml file.

I'm using bluez 4.x and qtsixa on Eden 11.0.

I can solve this by configuring the ps3 controller as an input device, rather than a joystick, and hard coding keyboard presses to each button, but then I don't know how to get the axis working properly.

Is there anyway I can just turn on the system then use my sixaxis whenever I like without having to restart the app?
Reply
#2
nevermind - just spent hours hard coding the qtsixa profiles to keyboard codes, then passing that on to mednafen, zsnes and mupen. This works around the issue, but it was something I didn't want to take on because the key codes used by qtsixa are weird. Anyone, done now so this thread can be closed.
Reply
#3
(2012-07-29, 18:39)wellspokenman Wrote: nevermind - just spent hours hard coding the qtsixa profiles to keyboard codes, then passing that on to mednafen, zsnes and mupen. This works around the issue, but it was something I didn't want to take on because the key codes used by qtsixa are weird. Anyone, done now so this thread can be closed.


could you give me detailed info on how you did this as am having the same problem
Check out my Fanart.tv stuff!
...........I also accept disc requests if image not on fanart.tv database !!!!
Reply
#4
Sure thing. What I did was ignore xbmc, and just tell the ps3 controller to act like a keyboard. I had to do this to enable detection after xbmc loads, and to prevent the joystick controlling xbmc in the background while I was inside an emulator.

Edit /var/lib/sixad/profiles/xx:xx:xx:xx:xx - your controller reads this upon connection. Remember you can turn off the controller by holding the ps button for 12 seconds - handy when testing.

I'd kind of like to know what keymap QtSixa uses - seriously no idea where these keycodes come from. Most of them are a standard of sorts, but pageup and pagedown could only be found through a lot of trial and error.

Code:
# ##########################
# sixad configuration file #
########################## #

# Features (input is what lets you use keyboard presses, joystick for axis/js recognition)
enable_leds 1
enable_joystick 1
enable_input 1
enable_rumble 0
enable_timeout 1

# LED
led_n_auto 1
led_n_number 1
led_anim 1

# Joystick (notice that only the joystick axis is enabled - then prevents double keying for apps that recognise the js automatically)
enable_buttons 0
enable_sbuttons 0
enable_axis 1
enable_accel 0
enable_accon 0
enable_speed 0
enable_pos 0

# Input - "XBMC-Keyboard", by "Wellspokenman"
# O - CPU Usage
key_select 24
# Q - Queue
key_l2 16
# W - Stop
key_r2 17
# TAB - Fullscreen
key_start 15
# UP
key_up 103
# RIGHT
key_right 106
# DOWN
key_down 108
# LEFT
key_left 105
# F4 - Load state (zsnes, mednafen, mupen64)
key_l3 62
# F2 - Save state (zsnes, mednafen, mupen64)
key_r3 60
# Pageup
key_l1 104
# Pagedown
key_r1 109
# C - Context Menu
key_tri 46
# Backspace - back
key_cir 14
# I - Info
key_squ 23
# Enter - Select
key_cro 28
# Esc - Previous menu
key_ps 1
axis_left_type 0
axis_left_up 0
axis_left_right 0
axis_left_down 0
axis_left_left 0
axis_right_type 0
axis_right_up 0
axis_right_right 0
axis_right_down 0
axis_right_left 0
axis_speed 6
use_lr3 0

# Rumble
old_rumble_mode 0

# Timeout
timeout_mins 5
Reply
#5
(2012-08-03, 12:46)wellspokenman Wrote: Sure thing. What I did was ignore xbmc, and just tell the ps3 controller to act like a keyboard. I had to do this to enable detection after xbmc loads, and to prevent the joystick controlling xbmc in the background while I was inside an emulator.

Edit /var/lib/sixad/profiles/xx:xx:xx:xx:xx - your controller reads this upon connection. Remember you can turn off the controller by holding the ps button for 12 seconds - handy when testing.

I'd kind of like to know what keymap QtSixa uses - seriously no idea where these keycodes come from. Most of them are a standard of sorts, but pageup and pagedown could only be found through a lot of trial and error.

Code:
# ##########################
# sixad configuration file #
########################## #

# Features (input is what lets you use keyboard presses, joystick for axis/js recognition)
enable_leds 1
enable_joystick 1
enable_input 1
enable_rumble 0
enable_timeout 1

# LED
led_n_auto 1
led_n_number 1
led_anim 1

# Joystick (notice that only the joystick axis is enabled - then prevents double keying for apps that recognise the js automatically)
enable_buttons 0
enable_sbuttons 0
enable_axis 1
enable_accel 0
enable_accon 0
enable_speed 0
enable_pos 0

# Input - "XBMC-Keyboard", by "Wellspokenman"
# O - CPU Usage
key_select 24
# Q - Queue
key_l2 16
# W - Stop
key_r2 17
# TAB - Fullscreen
key_start 15
# UP
key_up 103
# RIGHT
key_right 106
# DOWN
key_down 108
# LEFT
key_left 105
# F4 - Load state (zsnes, mednafen, mupen64)
key_l3 62
# F2 - Save state (zsnes, mednafen, mupen64)
key_r3 60
# Pageup
key_l1 104
# Pagedown
key_r1 109
# C - Context Menu
key_tri 46
# Backspace - back
key_cir 14
# I - Info
key_squ 23
# Enter - Select
key_cro 28
# Esc - Previous menu
key_ps 1
axis_left_type 0
axis_left_up 0
axis_left_right 0
axis_left_down 0
axis_left_left 0
axis_right_type 0
axis_right_up 0
axis_right_right 0
axis_right_down 0
axis_right_left 0
axis_speed 6
use_lr3 0

# Rumble
old_rumble_mode 0

# Timeout
timeout_mins 5


cant tell you how much I appreciate this, thought I would have to send the controller to the never used box lol
I cant test atm but will post results when at pc
Check out my Fanart.tv stuff!
...........I also accept disc requests if image not on fanart.tv database !!!!
Reply

Logout Mark Read Team Forum Stats Members Help
ps3 bluetooth joystick-keymap.xml0