Notice this code, for the media context:
Code:
<axe threshold="200" type="binary" posAction="" negAction=""/> <!-- axe 0 pan left/right -->
<axe threshold="200" type="binary" posAction="" negAction=""/> <!-- axe 1 pan foreward/back -->
<axe threshold="500" type="binary" posAction="RR Play/Pause" negAction=""/> <!-- axe 2 push/pull -->
<axe threshold="200" type="binary" posAction="" negAction=""/> <!-- axe 3 tilt foreward/back -->
<axe threshold="200" type="binary" posAction="RR Prev" negAction="RR Next"/> <!-- axe 4 tilt left/right -->
<axe threshold="100"
type="exponential"
startPulse="1"
endPulse="20"
posAction="RR Volume Up"
negAction="RR Volume Down" /> <!-- axe 5 Twist -->
This defines the actions to be used for each axis of the SN (space navigator.) If you want to just use the fifth axis, which is twisting, then you NEED to have 4 other definitions before it, because that is how the program determines which one is which, since they aren't defined. they just go in order.
posAction and negAction determine what to do when the device is moved that way on each axis. I dont recall which way is which for each control, but generally up is pos, and right is pos.. Just play with the control and you'll figure it out..
Now about the actions. They must be defined in order for the program to know what to do, hence the 'action' section
Code:
<actions>
<sendWindowMessage name="Context Up"
type="CopyData"
window="SpaceNavigatorDriver"
message="CONTEXT;Up"/>
<sendWindowMessage name="Context Down"
type="CopyData"
window="SpaceNavigatorDriver"
message="CONTEXT;Down"/>
<sendWindowMessage name="RR Volume Up"
type="CopyData"
window="RoadRunner"
message="VOL+"/>
<sendWindowMessage name="RR Volume Down"
type="CopyData"
window="RoadRunner"
message="VOL-"/>
<sendWindowMessage name="RR Mute"
type="CopyData"
window="RoadRunner"
message="MUTE"/>
<sendWindowMessage name="RR Play/Pause"
type="CopyData"
window="RoadRunner"
message="PLAY"/>
<sendWindowMessage name="RR Next"
type="CopyData"
window="RoadRunner"
message="NEXT"/>
<sendWindowMessage name="RR Prev"
type="CopyData"
window="RoadRunner"
message="PREV"/>
Basically, most of them just send a message to RR (roadrunner) the same way you would set a button code.
Context Swtiching:
TO enable the driver to send differnt commands dependig on what skin file is loaded (like the menu, or the audio player, etc) RR needs to send a message to the app. This is done with a few lines of code.
In each skin file you want to support, like menu.skin, games.skin, audioplayer.skin, etc, you need to add this line somewhere in there:
Then in exectbl.ini you need to add the following code:
Code:
"TIMER","SENDMSG;SpaceNavigatorDriver;CONTEXT;Media",Audio_Player.skin
"TIMER","SENDMSG;SpaceNavigatorDriver;CONTEXT;Media",Menu.skin
"TIMER","SENDMSG;SpaceNavigatorDriver;CONTEXT;Media",Menu2.skin
"TIMER","SENDMSG;SpaceNavigatorDriver;CONTEXT;Mouse",Games.skin
Basically, this says that if Audio_Player.skin is loaded, send a message to the spacenavigatordriver app, which says "CONTEXT;Media" and then the app will look for a context named "Media" and start using it.
When the games skin is loaded, it tells the app to use the mouse context, in which it simulates a mouse =]
I think this covers everything...
myconfig.xml.txt is the one i use, mediaconfig.xml.txt is the one setup to just do media controls. It needs to be renamed config.xml and placed in the same folder as the space nav driver.exe program. Just overwrite the default one.
Bookmarks