button values from 3d space mouse

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

Moderator: Moderators

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

Re: button values from 3d space mouse

Post by jwick »

Unless I'm missing something in your code, you don't have any Keyboard event handlers.
E.g.,
Private Sub Keyboard_KeyDown(ByVal keyCode As Integer) Handles Keyboard.KeyDown
Me.SetKeyText(keyCode)
End Sub

Private Sub Keyboard_KeyUp(ByVal keyCode As Integer) Handles Keyboard.KeyUp
Me.SetKeyText(keyCode)
End Sub
AntonyAlbertAnto
Posts: 17
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto »

no I do not have any such code line.
AntonyAlbertAnto
Posts: 17
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto »

If I am using those code line, will I be able to see the values from buttons.
jwick
Moderator
Moderator
Posts: 3328
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: button values from 3d space mouse

Post by jwick »

You need handlers for the button events.

The exact code lines above came from our vb sample code.
You probably need to do something different with the values when you get them. For now, I'd just print them out.
AntonyAlbertAnto
Posts: 17
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto »

Hi Jwick,
So is there an example for handlers for the space mouse buttons in vb
jwick
Moderator
Moderator
Posts: 3328
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: button values from 3d space mouse

Post by jwick »

I'll email a project to you.
I assumed you had it because some of your code looks like it came from it.
Let me know if you don't get it. Sometimes these things get blocked by firewalls.

Well, I tried. Your email server bounced it back. I'll try a link.
AntonyAlbertAnto
Posts: 17
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto »

Jwick, Did u send me the link. I haven't got an email or link.
jwick
Moderator
Moderator
Posts: 3328
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: button values from 3d space mouse

Post by jwick »

I didn't get a message that the link email bounced.
I've now sent you a PM.
AntonyAlbertAnto
Posts: 17
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto »

Hi Jwick,
Thanks for the link. I was able to see the translation, the rotation and the angle, but still nothing happened when I pressed the buttons of the space mouse. No value showed in the keydown box.
AntonyAlbertAnto
Posts: 17
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto »

Hi Jwick,
Do I need to assign any function to the button to see the values before running the program?
jwick
Moderator
Moderator
Posts: 3328
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: button values from 3d space mouse

Post by jwick »

By default the side buttons are mapped to driver radial menus.
You need to open our GUI when the application is running and map your buttons to actions that send an event to your application.

E.g., if I am running the vbMonitor sample:
I open our GUI (3DxSmartUI - 3Dconnexion Properties),
select my device,
go to the Buttons page,
select a button,
go to the vbMonitor category
select Back View.
When I press the button I assigned Back View to, I get an "8" in the Key Down TextBox.
AntonyAlbertAnto
Posts: 17
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto »

Hi Jwick,
Thanks I am able to see the values while press the buttons.
jwick
Moderator
Moderator
Posts: 3328
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: button values from 3d space mouse

Post by jwick »

Glad you have it working.
If you want different information for those button presses (e.g., "1", "2"), you can create a cfg file for your application.
AntonyAlbertAnto
Posts: 17
Joined: Wed Mar 24, 2021 1:09 pm

Re: button values from 3d space mouse

Post by AntonyAlbertAnto »

Thank you Jwick for your support. I am able to the see the values 1 and 2 while I press the buttons.
Thank you
Post Reply