public class SoVRMLKeySensor extends SoVRMLNode
See the X3D Specification, below.
<font color="#0000FF">NOTE:</font> This class does not exist in Open Inventor 10.0 and later.
This section describes the expected behavior of the node in a conforming X3D browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.
This section may reference portions of the X3D specification that are not present in this help file. The complete X3D spec is available at
The SoVRMLKeySensor
node generates events when the user presses keys on the keyboard. A SoVRMLKeySensor
node can be enabled or disabled by sending it an enabled
event with true or false. If the SoVRMLKeySensor
node is disabled, it does not track keyboard input or send events.
keyPress
and keyRelease
events are generated as keys which produce characters are pressed or released on the keyboard. The values of these events is a string of length 1 containing the single UTF-8 character associated with the key pressed.
actionKeyPress
and actionKeyRelease
events are generated as 'action' keys are pressed and released on the keyboard.
Action Key Values
HOME PGDN LEFT END UP RIGHT PGUP DOWN F1-F12 | 13 16 19 14 17 20 15 18 1-12 |
shiftKey_depressed, controlKey_depressed, and altKey_depressed events are generated as the shift, control, and alt keys on the keyboard are pressed and released. Their value is true when the key is pressed and false when the key is released.
When a key is pressed, the SoVRMLKeySensor
sends an isActive
event with the value true. Once the key is released, the SoVRMLKeySensor
sends an isActive
event with the value false.
The SoVRMLKeySensor
is not affected by its position in the transformation hierarchy.
File format/default:
VRMLKeySensor {
enabled | true |
metadata | NULL |
SoSFBool | enabled_changed |
SoSFInt32 | actionKeyPress |
SoSFInt32 | actionKeyRelease |
SoSFBool | altKey |
SoSFBool | controlKey |
SoSFBool | shiftKey |
SoSFBool | isActive |
SoSFString | keyPress |
SoSFString | keyRelease |
SoSFNode | metadata_changed |
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFInt32 |
actionKeyPress
Deprecated.
Output event.
|
SoSFInt32 |
actionKeyRelease
Deprecated.
Output event.
|
SoSFBool |
altKey
Deprecated.
Output event.
|
SoSFBool |
controlKey
Deprecated.
Output event.
|
SoSFBool |
enabled
Deprecated.
Enables (true) or disables (false) the sensor.
|
SoSFBool |
isActive
Deprecated.
Output event.
|
SoSFString |
keyPress
Deprecated.
Output event.
|
SoSFString |
keyRelease
Deprecated.
Output event.
|
SoSFBool |
shiftKey
Deprecated.
Output event.
|
metadata
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVRMLKeySensor()
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
enableEvents(boolean OnOffFlag)
Deprecated.
Enables/disables events for
all
SoVRMLKeySensor objects. |
static boolean |
isEventsEnabled()
Deprecated.
Queries if events are enabled for all objects of this class.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public final SoSFBool enabled
public final SoSFBool isActive
public final SoSFInt32 actionKeyPress
public final SoSFInt32 actionKeyRelease
public final SoSFBool altKey
public final SoSFBool controlKey
public final SoSFString keyPress
public final SoSFString keyRelease
public final SoSFBool shiftKey
public static boolean isEventsEnabled()
public static void enableEvents(boolean OnOffFlag)
SoVRMLKeySensor
objects.
If you have created several objects of this class, you can disable/enable events for all of them with a single call to this method.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com