SpaceBall/SpaceMouse Devices

Supported SpaceBall or SpaceMouse devices.

HyperMesh, HyperView, HyperGraph 2D, HyperGraph 3D, and MotionView now support the following SpaceBall or SpaceMouse devices from 3Dconnexion: SpaceNavigator, SpacePilot, SpaceExplorer and SpaceTraveler.

Before running the application, be sure that current drivers are installed for your device. The applications automatically detect and enable the use of the SpaceBall/SpaceMouse once the device is connected and working properly.

The 6 degrees-of-freedom input on the SpaceMouse devices require no special configuration prior to using it within the product, however the 3Dconnexion control panel may be used to adjust the sensitivity of the device, as well as how the axes respond to input.

Buttons on SpaceMouse devices are programmable, and some user customization is required in order to optimize the use of these buttons. Each button can be programmed using the 3Dconnexion control panel to generate a keyboard key press event, a button event, or to change one of the 3Dconnexion control panel settings. For example, button 1 on the SpaceBall/SpaceMouse device can be programmed to generate the HyperView keyboard shortcut 'M' (to toggle the mesh line display), using the Custom Functions button on the 3Dconnexion control panel.
Note: The applications listed above will respond best to 3Dconnexion buttons when they are configured to emit button events.
Figure 1. 3Dconnexion Control Panel - SpacePilot Sample Button Configuration (Windows)

Table 1. Functions with 3Dconnexion Devices
Button Event Number Function
1 Top View
2 Left View
3 Right View
4 Front View
5 Fit View
6 ISO View
7-10 View Memory Buttons
11-16 User defined Tcl callbacks
17-29 These buttons cannot be customized within the applications because they are supported across various platforms (Windows, Linux, and so on).
Note: On SpaceExplorer and SpacePilot devices, the T, L, R, F, and Fit buttons should be configured for button events 1, 2, 3, 4, and 5 respectively.

Custom Button Handler

SpaceMouse button events 11 - 16 are programmed to call user defined Tcl callback handlers. These allow you to customize the SpaceMouse functionality to meet your needs.

Three Session object methods are provided to allow programmability of 3Dconnexion buttons.
Button Description
GetSpaceballButtonMin() Returns the minimum button event ID that can be programmed with a Tcl callback.
GetSpaceballButtonMax() Returns the maximum button event ID that can be programmed with a Tcl callback.

(buttonID, procName)

Registers a Tcl callback against the specified button event ID. The callback procedure takes a state parameter, which is the state of the button at the time the event has occurred.

True - indicates the button was pressed.

False - indicates the button has been released.


The following example demonstrates how to program button event 11 to toggle animation on and off.
proc ::FlipAnim { state } {

   # Only respond to button events, which occurs when state == "True"
   if {$state == "False"} {

   hwi OpenStack;
   set t [lindex [split [expr rand()] .] end];

   catch {
       hwi GetSessionHandle sess$t;
       sess$t GetProjectHandle proj$t;
       proj$t GetPageHandle page$t [proj$t GetActivePage ];

       if {"false" == [page$t IsAnimating] } {
           page$t StartAnimation;
       } else {
           page$t StopAnimation;

   hwi CloseStack;


set t [lindex [split [expr rand()] .] end];
hwi GetSessionHandle sess$t
set buttonID [sess$t GetSpaceballButtonMin];
sess$t RegisterSpaceballCallback $buttonID ::FlipAnim;
sess$t ReleaseHandle;