Reading Button Configuration and Speed Setting

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
Tim Frost
Posts: 5
Joined: Tue Oct 07, 2008 1:16 am
Location: Ely, Cambridge UK

Reading Button Configuration and Speed Setting

Post by Tim Frost »

Hi,

I am developing an application that will use a SpaceExplorer or SpaceNavigator mouse (in CodeGear C++ builder).

Within my app I allow the user to select what the buttons do. However this will vary depending on how the Mouse control panel buttons are set. Is there a way to read the current button assignments from the mouse? I am using GetKeyLabel & GetKeyName, but these do not seem to do it.

Also I want to allow the user to change the mouse sensitivity, using the 3DConnexion functions, but I want to have a display of the current setting in my application. Is there a way to read (and to write) the mouse sensitivity.

Thanks Tim
Tim Frost
FrostNet Ltd
jwick
Moderator
Moderator
Posts: 3455
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Hi Tim,

You can read and change just about anything shown in the 3DxWare GUI via the "Sync API". Download the 3DxWare SDK (you'll find it in the archive section under your device). It's documented in the online doc that comes with the SDK.

Jim
3Dx Software Development
Tim Frost
Posts: 5
Joined: Tue Oct 07, 2008 1:16 am
Location: Ely, Cambridge UK

Post by Tim Frost »

Jim,

Thanks for that.

However I am slightly confused...

Back in the days of the serial mice I was using the SI library to interface to the mice. When the USB mice came in I changed to the COM interface. This feels like a step backwards.

Added to all of that I am having trouble with siOpen, which returns NULL. Of course I think I am doing everything else right. Do I need to siIntitialise or the siWinInit function or both. Although none of the combinations make siOpen work.

Anything else I should be aware of?

Tim
Tim Frost
FrostNet Ltd
jwick
Moderator
Moderator
Posts: 3455
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Hi Tim,

3DxInput has not been brought up to the full functionality of the Si API.

If you want to have the functionality that you mention you need to switch back. Si isn't going away.

We'll need to look into why you are getting a NULL back from SiOpen. See if there is some information in the driver's log file WRT your call.

Yes you do need to call SiInitialize and SiOpenWinInit first. SiOpenWinInit is where you give the driver the hwnd that it uses to talk back to your app. If that hwnd isn't valid, it will probably reject the connection.

Jim
3Dx Software Development
jwick
Moderator
Moderator
Posts: 3455
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

I might suggest a different tactic. Rather than spending a lot of effort of synchronizing with the driver, and duplicating the GUI information, you might want to cut the driver out and go directly to the device to get your data. You can then present your own GUI in they way that makes the most sense for your application.

You can use RawInput, Direct Input or HID to access the device directly and cut out the middle man.

Jim
3Dx Software Development
Tim Frost
Posts: 5
Joined: Tue Oct 07, 2008 1:16 am
Location: Ely, Cambridge UK

Post by Tim Frost »

Hi Jim,

Where do I find documentation on these methods? Apologies if this should be obvious.

Tim
Tim Frost
FrostNet Ltd
jwick
Moderator
Moderator
Posts: 3455
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

RawInput, Direct Input, etc? They are standard Microsoft technologies.
We have some examples posted in the Windows Developer's Forum.
Post Reply