<DONE> SpaceNavigator Driver - Mouse Joystick Keyboard

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Locked
RBC9
Posts: 105
Joined: Tue Dec 19, 2006 3:02 am

<DONE> SpaceNavigator Driver - Mouse Joystick Keyboard

Post by RBC9 »

Hi,

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


Image

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.. :shock:


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.

1) Installation

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

Image

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”

Image


Select “Browse my computer for driver software”


Image

Select “Let me pick ….”


Image

Select “RBC9 SpaceNavigator …”

Image

Select “Install this driver software anyway”

And u should obtain …

Image

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.

Image

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.

Image

Click on It give a balloon with « Status », Device Remove, Current Layout ….

Right Click on it, pop up the menu.

Image


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  :P


Image

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.

Image

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

Image

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

Image

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 :

Image
Joy Axe / Joy Btn / Joy POV : choose Axe / Btn to bind on Joystick.

Image
Mouse X / Y : Change the Sensitivity

Image
Mouse Wheel : Choose the repeat delay

Image

Mouse Button :

Image
Switch Layout : The layout u want to switch to

Image


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”
Keyboard:

Image

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.
“Key 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 … :roll:

Image

Apply : Save ur Config and quit Layout Editor.
Cancel : Forget all the thing ur change.

Calibrate …
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.

Image
 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.
Know bugs:

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.
Have Fun

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.
Last edited by RBC9 on Fri Mar 09, 2007 9:47 am, edited 21 times in total.
kado99
Posts: 1
Joined: Fri Jan 26, 2007 11:10 pm

Space Traveler

Post by kado99 »

Any tests on using this with a space traveler. I would like to purchase one of these units for some specialty software that I use. And would like to map all the functions to most commonly used functions in that software. I like the use of the Navagator but want more buttons and sleeker look of the traveler.

Thanks for making a wonderful idea a usable reality. :lol:

Kado
lorf79
Posts: 1
Joined: Mon Jan 29, 2007 4:54 am

Something wrong with file?

Post by lorf79 »

I would really like to test this driver and software but unfortunately I can't open the rar-file sent via webfilehost, it is 246 bytes and not a valid rar archive it seems. Would you be so kind as to send it again or maybe host it somewhere.

I am interested in evaluating the SpaceNavigator for a 3D-solution that is currently not supported by 3dconnexion and think that this driver/software might help me tremendeously.

/Mats
RBC9
Posts: 105
Joined: Tue Dec 19, 2006 3:02 am

Post by RBC9 »

Link updated
Last edited by RBC9 on Tue Jan 30, 2007 2:38 pm, edited 1 time in total.
vikorasmussen
Posts: 2
Joined: Sun Jan 28, 2007 7:56 am

A big thanks!

Post by vikorasmussen »

I have tested this now for a couple of hours, and so far it works great.

The whole concept of a driver for the SN is great, and if you continue to refine the program I think it will solve almost all the problems / questions people have about using the SN outside 3D applications.

As a starter, you can make the "Volume Up / Down" Keymapping work (It's doesn't, for some reason)...

And give me the possibility to clone binds, så that a bind for two directions to two buttons will be faster/easier. (Hope you understand what I mean by this)

Anyway, you are doing a great job!..

I might be able to help you hosting other versions later on, if you need something slightly more permanent than where the file is currently at.
RBC9
Posts: 105
Joined: Tue Dec 19, 2006 3:02 am

Post by RBC9 »

Hi,

- Vol Up/Down : it works on my computer , with SpaceNav button or Axe ...
are other key on the same "source" (Axe/Btn) working ?

(info : The driver "Stop" sending info while u are in "Edit Layout" mode)


- Clone Binds : yeeeesssss ! , i know now what i forget and can t remember something i would add ... lol ... Duplicate Bind and/or Layout

in few days ... (i have to repair my daughter'PC b4)


-> i m look for an idea in the mouse "move" part .. if u try it u ll see it s hard to draw circle , it seems to be something with "sensi" and the repeat timing.

-> i think about add a "Macro" mode , to send key one after one .. but i dont need it for now ... so , i don t know if i ll add it.

-> Hosting , i f u have a solution , yes. I don t have web space, so i use free host , but ...



Edit :

- Seems Volum up/down doesn t work anymore... must investigate ...

- Some change in user Interface

ChangeLog :

- 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.

Binary Install

Doc
DonTonino
Posts: 4
Joined: Fri Dec 29, 2006 9:29 am

Post by DonTonino »

Will look into this ASAP, were it to solve my issues with ANSYS it would be real great! no matter the outcome though, a big thump up for the effort and time you spent RBC9!
vikorasmussen
Posts: 2
Joined: Sun Jan 28, 2007 7:56 am

macro function

Post by vikorasmussen »

A macro function would not be a bad addition, although as you say, it may not have THAT many uses.

One example I can see where it might help to have it is in the following scenario:

I tried to bind the X axis to change the volume in iTunes. Since binding to "volume keys" did not work for some reason, I decided to use the iTunes shortcuts [Ctrl+Up Arrow] and [Crtl+Down arrow].

When I then bind [Keypress Ctrl] and [Keypress Up], both with 10ms repeat times... Controlling the volume will only work now and then. Mos tof the time iTunes will react as if i had only clicked [Up Arrow].

I thought the reason for this might be that the repeated [Ctrl] keypress event somehow missed the [Up] keypress event... And was able to fix it by setting KeyHold [Crtl] over a certain value, and KeyRelease [Ctrl] when under a certain value, on the x axis.

Maybe the macro function could be used for something like, click Ctrl and Up at the *exact* same time..


I hope you understand most of what I am writing. English is not my first language, and I guess it is not your either.

I'll download your newest version and test it now :)
MikeD
Posts: 1
Joined: Tue Jan 30, 2007 4:11 pm

Post by MikeD »

I tried to use this and got it to work as a mouse, however it stayed as a mouse when I went into Google Earth. So my question is does this completely override an applications setting to use it? Is there some way to restore original functionality to programs like Google Earth (or others I assume) once you have installed this?
RBC9
Posts: 105
Joined: Tue Dec 19, 2006 3:02 am

Post by RBC9 »

MikeD wrote:I tried to use this and got it to work as a mouse, however it stayed as a mouse when I went into Google Earth. So my question is does this completely override an applications setting to use it? Is there some way to restore original functionality to programs like Google Earth (or others I assume) once you have installed this?
Driver use "hardcoded Layout".

U should use the interface and create a "Empty layout" as default. or associate "googleearth.exe" to this layout.
RBC9
Posts: 105
Joined: Tue Dec 19, 2006 3:02 am

Re: macro function

Post by RBC9 »

vikorasmussen wrote:....
- i ll look for the volume key , seems i ve made a mistake for key from "Application" to "ionternational9" ....

- for ur "CTRL+UP" key ... ok : there s is a bug for the repeat on modifier key (CTRL shift ...)

But , if don t use "repeat" , u ll have the standart repeat from Windows ... so volume change has u want.

Edit : if u use the "Right Control" instead of "Left Control" , the repeat works , that made no sense , same function , only a ScanCode differ ...

ChangeLog 02-01 :

- Add "Special Key" Feature for Volume / Play / www function

Binary Install

Doc
blenderman
Posts: 4
Joined: Wed Jan 10, 2007 7:19 am

Post by blenderman »

Hi RBC9,

Great Job, but is this driver just working with Vista? I want to run it under german version of XP Pro.

Thank you,
blenderman
RBC9
Posts: 105
Joined: Tue Dec 19, 2006 3:02 am

Post by RBC9 »

at home
works on
- Vista Ultimate 32b French
- XP Corpo French.

at office
- Vista Buss 32b UK

and on a friend :
- XP (pro ? Fam ?) German.

ChangeLog 02-03 :

- Rewrite KeyBoard HID : Repeat adjust.

- Add Export / Import bind to/from file.


[/url]
Last edited by RBC9 on Sun Feb 04, 2007 4:31 am, edited 1 time in total.
RBC9
Posts: 105
Joined: Tue Dec 19, 2006 3:02 am

Post by RBC9 »

ChangeLog 02-04 :

- Bug remove : Driver generate "Blue Screen" with the "Switch To" Bind function.

Binary Install

Doc


iTunes Volume Bind Sample
DaveF
Posts: 8
Joined: Thu Feb 01, 2007 2:06 pm

Post by DaveF »

Hi RBC9-

Thanks for your work to get a 2D driver for the SN. Unfortunately, I have a SpaceBall, not a SN, so the device ID is PID_C621 instead of 626.

So, it does not let me update the driver, or run RBC-9 SpaceNav. (It runs, but can't find a SpaceNavigator).

I am running Windows x64 (which does not support 2D on the spaceball). Could you look into this?

Thanks a bunch!

-Dave
Locked