Purpose

This module allows to override the mouse/keyboard bindings of interactions provided through the Managed Interaction scheme.

Usage

Put this module into an Open Inventor scene graph with Managed Interactions, before the nodes whose interactions are to be mapped to a new mouse/keyboard binding.

Tips

Note

The order of actions in the ‘override’ fields has no influence on the precedence of the actions. If two actions have the same mapping (and are sensitive at the same position), the action that comes first in the Inventor scene wins.

Output Fields

self

name: self, type: SoNode

Connect this to a group node containing nodes that define Managed Interactions. This node must connected before the nodes with the interactions to have an effect.

Parameter Fields

Visible Fields

Override (overridePointingActions)

name: overridePointingActions, type: String

Lines must have the following structure:

[providerID “.”]actionID “:” [trigger][“,” triggers][“,”]

MyProviderID.MyActionID:SC?1

This activates ‘MyActionID’ of ‘MyProviderID’ on pressing the left mouse button (1) with Shift pressed (S) and Control ignored (C?). All other modifier keys and other mouse buttons must be released, because they are not mentioned. All default triggers are ignored, because there is no comma at the end.

The providerID is optional; if omitted, each actionID of all modules in the (sub-) network is mapped to the given triggers.

Triggers look like this:

[“S”[“?”]][“C”[“?”]][“A”[“?”]][“1”[“?”]][“2”[“?”]][“3”[“?”]]

S?C?A?1?2?3?

The letters denote the modifier keys: S: Shift, C: Ctrl, A: Alt.

The numbers denote the mouse buttons: 1: left, 2: middle, 3: right.

A question mark after a letter (modifier key) or a number (mouse button number) means that this modifier or button is completely ignored when matching (it can be pressed or released).

If a line does not end on a comma, the default triggers are ignored.

If a modifier key letter or a mouse button number is not given, the action will only trigger if the modifier/button is released.

Examples:

SCA?12

Shift and Control must be pressed (SC), Alt is ignored (A?). Activates on pressing the left and the middle mouse button (12). Right mouse button must be released, because it is not mentioned. Default triggers are ignored, because there is no comma at the end.

S?2?3

Shift is ignored (S?), Control and Alt must be released, because they are not mentioned. Left mouse button must be released, because it is not mentioned. Middle mouse button is ignored (2?), and right mouse button activates the command (3). Default triggers are ignored, because there is no comma at the end.

SoView2DCSOExtensibleEditor.CSOBrushCreateAction:1

The action is triggered by pressing the left mouse button (1). Keyboard modifiers and other mouse buttons must be released, because they are not mentioned. Default triggers are ignored, because there is no comma at the end.

SoView2DCSOExtensibleEditor.CSOBrushCreateAction:S?C2

The action is triggered by pressing the middle mouse button (2), Shift modifier is ignored (S?), Control modifier must be pressed (C). Alt modifier and all other mouse buttons must be released, because they are not mentioned. Default triggers are ignored, because there is no comma at the end.

SoView2DCSOExtensibleEditor.CSOBrushCreateAction:

This will disable the action completely, because neither trigger nor comma is given.

Override (overrideCommandActions)

name: overrideCommandActions, type: String

Lines must have the following structure:

[providerID “.”]actionID “:” [shortcut][“,” shortcuts][“,”]

Shortcuts look like this:

[“S[hift]-“][“C[trl]-“][“A[lt]-“]Keyname

or like this:

[“S[hift]+”][“C[trl]+”][“A[lt]+”]Keyname

The modifier keys can abbreviated (S, C, A) or spelled out (Shift, Ctrl, Alt).

The modifier names and the key names are case-insensitive: Shift is the same as shift, S, or s.

If a line does not end on a comma, the default shortcuts are ignored.

Examples:

SoCameraInteraction.ViewAll:V

The ViewAll action of the SoCameraInteraction module in the (sub-) network is triggered by pressing the V key.

S-V

The action is triggered on pressing both Shift and V.

S+v

Same as above, using a ‘+’ instead of ‘-’ and a lower case letter for the keyboard shortcut.

Shift-v

Also same as above, using the spelled-out version of the modifier key’s name.

One action can be triggered by multiple shortcuts, and both ‘+’ and ‘-’ can be mixed in the same line:

S+V,A-B

The action is triggered by either pressing Shift and V, or pressing Alt and B.

Override (overrideOffsetActions)

name: overrideOffsetActions, type: String

Lines must have the following structure:

[providerID “.”]actionID “:” [triggerEntry][“,” triggerEntries][“,”]

Where triggerEntries must conform to the following:

trigger[“;” sensitivity][“;” sensitivity][“;swap”]

Sensitivity is a floating point value that gives a (multiplication) factor for the offset values - if two are given, these are different for the possible two axes of an offset action.

If swap is specified, the values for the two axes are swapped. This can, e.g., be used for keyboard shortcuts, since normally these are only mapped to the first axis.

A trigger can have one of three forms:

“button:”<Trigger as described in Override (overridePointingActions)>
“key:”<Trigger as described in Override (overrideCommandActions)>[“/” <Second trigger for opposite direction>]
“wheel:”[“S”[“?”]][“C”[“?”]][“A”[“?”]]

If a line does not end on a comma, the default shortcuts are ignored.

Examples:

SoGenericOffsetAction.default:button:1,

The X and Y accumulated offset values are changed on moving the mouse (up/down and left/right) while the left mouse button is pressed (1). Also, turning the mouse wheel changes the accumulated offset values by default, because of the comma at the end.

SoGenericOffsetAction.default:key:S-A;swap

The Y value of the accumulated offset is increased on pressing the key A while holding Shift (S-A). Default triggers are ignored, because there is no comma at the end.

SoGenericOffsetAction.default:key:S-A/A-A;swap

Same as above, but now the value is also decreased on pressing A while holding Alt (A-A).

SoGenericOffsetAction.default:wheel:S

The turning of the mouse wheel triggers an offset action if Shift (S) is pressed. Default triggers are ignored, because there is no comma at the end.

SoGenericOffsetAction.default:wheel:S;3.5

Turning the mouse wheel while holding Shift (S) will change the offset value in steps of 3.5 (sensitivity). Default triggers are ignored, because there is no comma at the end.

SoGenericOffsetAction.default:wheel:S;3.5;swap

Same as above, but now the X value instead of the Y value (swap) of the accumulated offset is changed in steps of 3.5 (sensitivity) on turning the mouse wheel. Default triggers are ignored, because there is no comma at the end.

For mapping keys to an offset action for stacking through slices, read the Interaction chapter of the module help for SoView2DSlicer.

Ignore Other Pointing Actions

name: ignoreOtherPointingActions, type: Bool, default: FALSE

If this is set, all pointing actions not mentioned as override are ignored completely.

Ignore Other Command Actions

name: ignoreOtherCommandActions, type: Bool, default: FALSE

If this is set, all command actions not mentioned as override are ignored completely.

Ignore Other Offset Actions

name: ignoreOtherOffsetActions, type: Bool, default: FALSE

If this is set, all offset actions not mentioned as override are ignored completely.