public class SoKeyboardEvent extends SoButtonEvent
SoKeyboardEvent
represents keyboard key press and release events in the Open Inventor event model.
Add an SoEventCallback
node to the scene graph to handle Open Inventor events.
See also:
SoEvent
, SoButtonEvent
, SoLocation2Event
, SoMotion3Event
, SoMouseButtonEvent
, SoSpaceballButtonEvent
, SoHandleEventAction
, SoEventCallback
, SoSelection
, SoInteraction, SoWinDevice
Modifier and Type | Class and Description |
---|---|
static class |
SoKeyboardEvent.Keys
The keyboard keys.
|
SoButtonEvent.States
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoKeyboardEvent()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SoKeyboardEvent.Keys |
getKey()
Gets which key generated the event.
|
static SoKeyboardEvent.Keys |
getKeySym(int key) |
byte |
getPrintableCharacter()
Convenience routine that returns the character representing the key, if it's printable.
|
static boolean |
isKeyPressEvent(SoEvent e,
SoKeyboardEvent.Keys whichKey)
Returns whether the passed event is a keyboard press event of the passed key.
|
static boolean |
isKeyReleaseEvent(SoEvent e,
SoKeyboardEvent.Keys whichKey)
Returns whether the passed event is a keyboard release event of the passed key.
|
void |
setKey(SoKeyboardEvent.Keys whichKey)
Sets which key generated the event.
|
getState, setState
getNormalizedPosition, getPosition, getPosition, getPositionFloat, getPositionFloat, getTime, setAltDown, setButton1Down, setCtrlDown, setPosition, setPosition, setShiftDown, setTime, wasAltDown, wasButton1Down, wasCtrlDown, wasShiftDown
dispose, getNativeResourceHandle
public static SoKeyboardEvent.Keys getKeySym(int key)
public void setKey(SoKeyboardEvent.Keys whichKey)
public static boolean isKeyPressEvent(SoEvent e, SoKeyboardEvent.Keys whichKey)
SoKeyboardEvent.ANY
is passed, this returns true if the event represents a keyboard press of any key.public SoKeyboardEvent.Keys getKey()
public static boolean isKeyReleaseEvent(SoEvent e, SoKeyboardEvent.Keys whichKey)
SoKeyboardEvent.ANY
is passed, this returns true if the event represents a keyboard release of any key.public byte getPrintableCharacter()
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com