Using my SpaceNavigator in ALL my application and or game … and still using it in 3D app with original 3DxWare software ….
I dream of it, i hope in my socks for Christmas ... And … no luck.
So, I write it.
A driver for our SpaceNavigator
Why a Driver and not a simple User-Mode application? Or using the 3DConnexion SDK ?
Some application or game don’t accept hooking keyboard , or use DirectX Input , so with a user-mode app, I’m not able to send information.
With a driver , SpaceNavigator don t “emulate” a keyb/mouse/Joy, but IS a keyboard , IS a mouse and IS a Joystick.
In a few word, and HID Device (Human Interface Device) has a HID_Descriptor telling OS (Windows) witch kind of device he is.
This HID_Descriptor is in the firmware device and OS ask for it when initializing.
Ok, with no driver installed, windows use the standard HID driver (HIDClass.sys), and request the HID_Descriptor to it. The HID_Class driver read information from the device and sends it back to windows.
If u installs a driver, u can send back a “fake” HID_Descriptor.
In the same way, a HID_Descriptor can tell the OS that the device is a “Multi-device”.
The original HID_Descriptor from SpaceNavigator is at 99% a Joystick one.
In fact , it s more than 99% , only 2 bits in the descriptor , who has more than 12000 Bytes , are different …
I think this is voluntary ….
Here are the first bytes of this descriptor:
- Code: Select all
/* Space Nav */
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x08, // USAGE (Undefined)
0xa1, 0x01, // COLLECTION (Application)
0xa1, 0x00, // COLLECTION (Physical)
0x85, 0x01, // REPORT_ID (1)
0x16, 0x0c, 0xfe, // LOGICAL_MINIMUM (-500)
0x26, 0xf4, 0x01, // LOGICAL_MAXIMUM (500)
0x36, 0x00, 0x80, // PHYSICAL_MINIMUM (-32768)
0x46, 0xff, 0x7f, // PHYSICAL_MAXIMUM (32767)
The second line : 0x09, 0x08 … change it to 0x09,0x04 and u have a Joystick ….
With those 2 bits changed, SpaceNavigator is seen as a Joystick without any driver.
OK, but I want more , I want bind, I want key , I want a mouse , I want a Joystick … and a big d..
Let s Go ….
There is 2 parts in my driver:
- RBC9-SpaceNav.sys , the driver.
- RBC9-SpaceNav.exe , a user mode application to create Layout(s) that the driver will use. And if u want , an “AutoSwitch” feature.
NB: there is a “Harcoded Layout”, used by default if u don t creates more layouts.
The binds are
Nav Axe -> Joy Axe and Mouse Move
Nav Btn -> Joy Btn and Mouse Btn
Nav “Rotation” -> Mouse Wheel.
Stop the 3DxWare application for now. (U can restart it arfter installation).
Run “RBC9 - SpaceNav.msi” and follow the step … quiet simple … folder to install and … nothing more …
This will install RBC9-SpaceNa.exe and copy to your system32 driver directory the RBC9-SpaceNav.sys
DON’T start the exe now, one more step b4.
Go to your device manager, select the SpaceNavigator
If u have multiple HID on your computer , check the property info and look for the one with VID_046D&PID_C626.
Now right click and select “update driver software”
Select “Browse my computer for driver software”
Select “Let me pick ….”
Select “RBC9 SpaceNavigator …”
Select “Install this driver software anyway”
And u should obtain …
Now, in your device manager, u have 2 new device,
a HID Keyboard device and a HID-Compliant Mouse
and in your Game Controllers , a new Joystick.
The joystick has 8 axes and 8 buttons.
This is in case of some game need “Throttle” or “Slider” instead of X Y Z Rotation …
At this moment the driver is working , and u should move SpaceNavigator to see Joy cursor move and Button Light On … it s the “hardcoded Layout” running.
2) Create Layout / Configure :
Now u can start RBC9-SpaceNav.exe
A Icon should appear in ur Systray.
Click on It give a balloon with « Status », Device Remove, Current Layout ….
Right Click on it, pop up the menu.
The Menu Option:
- SpaceNavigator Auto : Turn On/Off AutoSwitch , this feature need the RBC9-SpaceNav.exe running, the driver could NOT do it by himself.
AutoSwitch is a feature that tells the driver with Layout use depends the Application with Focus.
The AutoSwitch will use Layout define for listed applications and go back to the Default Layout for the others.
- Switch Layout: what it says … Switch to a Layout.
- Edit Layout : Here we Are
U can create as many Layout as u Want …
For Each Layout , u can “Bind” What u want to what u want.
One Axe of SpaceNavigator to One Axe or multiple Axes on the Joystick , in the same time , for this Axe , a mouse move and a Key “Hold” … there is no limitation …
A) Create a New Layout : Click on the “Add” button , a new line with “-New Layout-“ appears at bottom of the Layout list. Click it to rename.
For Each Layout u can choose a “Global” Deadzone for the Axes.
B) Each Layout have (or not) a list of “Exe” for the AutoSwitch part.
Use “Add” / “Del” button , and click to type in the exact name of the application.
On the picture I have a “Dummy Layout” use to “turn off” all bind when I m in 3Dx software.
C) Select the SpaceNavigator Axe/Button u want to bind
NB: u can see value; indicate the actual position of SpaceNavigator Axe. Use it to adjust min / max or Deadzone.
D) Click “Add” under “Bind To” list
For each Bind u can Invert Axe/Btn , and select the part of the axe to use from SpaceNav.
Part postion with the Slider and/or Positive/Negative value with the Combo.
E) Now select Bind Type :
Joy Axe / Joy Btn / Joy POV : choose Axe / Btn to bind on Joystick.
Mouse X / Y : Change the Sensitivity
Mouse Wheel : Choose the repeat delay
Mouse Button :
Switch Layout : The layout u want to switch to
NB: I use this i.e., I bind “Alt Key” + “Tab Key” when I push down the SpaceNavigator, so I get the windows Task Switch.
I add a bind on the same axe to “Switch Layout”
So When I push, Task Switch come, and the SpaceNav is bind to 3 new functions only.
1 : Pull up : leave the task switch and go back to another layout.
2 : left and right rotation : bind to “Left Arrow” and “Right Arrow”
U can bind 5 key in one “Bind”, if u need more , add a second bind.
Each bind could be a
“Key Press” : standart keyboard event.
“Key Hold” : the key is keep press until another bind tell to release.
A repeat option is available, i.e., in some video app, u can go from frame to frame with left/right arrow.
Sometimes press key is enough , if u keep down, but sometimes need to press/release to go on… and the speed u do it ..
Ok , i create 3 bind on the rotation axe ,
1 : min 10 max 100 : repeat delay 500 (2 times per second)
2 : min 101 max 200 : repeat delay 250.
3 : min 201 max 360 : repeat delay 50
With this I have a sensitive control on the frame to frame movement …
It s an example ….
Or u can use it as “Autofire” in some games …
Apply : Save ur Config and quit Layout Editor.
Cancel : Forget all the thing ur change.
Some infos :
- When u are in the Edit Layout screen , the driver stop sending to Joystick Mouse and Keyboard. The driver restart when u leave this screen.
- The AutoSwitch option is save when u change in the Edit Layout Screen , if u turn on /off in the pop up menu , it will go back to the saved state next restart of the application.
- The driver load the default layout when it start, so u don t need to run exe if u don t want any autoswitch.
- U can change layout without using exe application.
Pull up and turn left (at end point max value)
the space navigator for more than 3 seconds and it will enter in “Special” mode.
The Led flashing indicate this mode.
Left Button : go to default Layout.
Right Button : go to next Layout.
Push down to leave “Special” mode.
Uninstall the driver, (no problem with the application).
In the device manager , when the uninstall procedure looks like “freeze”, u have to move something on the SpaceNavigator to “free” a thread in the driver. I have a mistake with an event in the IOCTRL routine … see later.
Cedric Aka RBC9.
ChangeLog 01-30 :
- Remove Add/Del button for Layout and Bind , replace with right-clic context menu.
- Add Copy/Paste for Bind
- Add Duplicate for Layout
- Bind List : info on 'bind to' in grid , (Key X - Joy Axe rZ ...) , without clic on each item.
ChangeLog 02-01 :
- Add "Special Key" Feature for Volume / Play / www function
ChangeLog 02-03 :
- Rewrite KeyBoard HID : Repeat adjust.
- Add Export / Import bind to/from file.
ChangeLog 02-04 :
- Bug remove : Driver generate "Blue Screen" with the "Switch To" Bind function.
ChangeLog 02-11 :
- Option for Animating Icon
- Option for SpaceNav Button : Standart - Short Press - Long Press / with Delay
--> something like Pocket/PDA , short for one function and long for another....
ChangeLog 02-11 / Bis :
- Standart - Short Press - Long Press ... for Axes
ChangeLog 02-11 / Ter:
- Sleep / Hybernate Resume , SpaceNav doesnt wake up : Correct.
ChangeLog 02-15 :
- Error on Key 4 in multikey bind
- Hide MX1000 Menu for user without MX1000 Logitech Mouse
ChangeLog 02-17 :
- Add "Comment" textbox for each bind ...
- "Should" support SpacePilot Device
In "Edit Layout" , select your device.
Not complete , for test only.
ChangeLog 02-18 :
- Correction of HID_Descriptor for SpacePilot and SpaceTraveler
- Bug in RBC9-driver when a Feature request is send from 3DConnexion driver to device.
- Start Add for SpaceBall device
- Modify Joystick "throttle" to "Slider 2" for Jean-Marc Accoustic module.
Since , no a lot of people use Joystick throttle for the moment ... doing something else if needed.
ChangeLog 02-27 :
- Wrong PID for SpaceTraveler
ChangeLog 03-09 :
- Registry Error with ControlSetxxx / LastknowGodd selection
Download Thx to vikorasmussen for hosting.