button values from 3d space mouse

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
AntonyAlbertAnto
Posts: 4
Joined: Wed Mar 24, 2021 1:09 pm

button values from 3d space mouse

Post by AntonyAlbertAnto » Wed Mar 24, 2021 1:20 pm

Hi,

I would really appreciate if someone could help me to get me a vb.net code to get the button values from 3d space mouse while I am pressing them.
There are 2 buttons left and right buttons on 3d space mouse. If I could know the values I could assign actions while the buttons are pressed.

jwick
Moderator
Moderator
Posts: 2827
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: button values from 3d space mouse

Post by jwick » Thu Mar 25, 2021 1:53 am

I assume you have a SpaceNavigator-type (two button) device.
By default, those are assigned to show radial menus and nothing is sent to the application.

Which API are you using to read the device?

Is this for use in a single application that you are writing, or a general utility?
If you are just trying to have the buttons do something in other applications, there are ways of doing this with the driver.

AntonyAlbertAnto
Posts: 4
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto » Thu Mar 25, 2021 12:32 pm

Hi jwick,

Thanks for responding.
I got the code from this forum to see the values of 6 axis of the 3D space mouse while they are moved.
Now, I would like to see the values of the buttons while they are pressed.
I am using 'windows forms app (.NET)' in Visual studio 2019 for coding (VB .net).

jwick
Moderator
Moderator
Posts: 2827
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: button values from 3d space mouse

Post by jwick » Fri Mar 26, 2021 2:40 am

You are using our TDxInput assembly?

Probably the default cfg file is being used for your application. You will see the cfg in use if you hover over the 3Dx systray icon.

Do you see Radial Menus come up when you press the buttons?

You can use the GUI to assign those buttons to events that will be sent to your application, instead of showing Radial Menus. Depending on what cfg gets loaded, you should see something like "Application Use" in the GUI when assigning button actions.

AntonyAlbertAnto
Posts: 4
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto » Thu Apr 08, 2021 12:28 pm

Hi jwick,

I tried the way you mentioned, that using GUI instead of radial menus but it didnt work.
Is there some vb code to access the 2 buttons.

jwick
Moderator
Moderator
Posts: 2827
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: button values from 3d space mouse

Post by jwick » Thu Apr 08, 2021 11:35 pm

Run your program, then start our GUI. Change some button assignment on your 3D mouse.
This will generate an xml file in %appdata%\3dconnexion\3DxWare\Cfg named for your program.
PM that file to me.

Post Reply