SoKeyboardEvent — keyboard key press and release events
Contents
Description
SoKeyboardEvent represents keyboard key press and release events in the Inventor event model.
Inherits From
SoEvent > SoButtonEvent > SoKeyboardEvent
Methods
SoKeyboardEvent()
Constructor.
staticSoTypegetClassTypeId()
Return the type id for the SoKeyboardEvent class.
voidsetKey(SoKeyboardEvent::KeywhichKey)SoKeyboardEvent::KeygetKey()const
Set and get which key generated the event.
staticSbBoolisKeyPressEvent(constSoEvent*e,SoKeyboardEvent::KeywhichKey)staticSbBoolisKeyReleaseEvent(constSoEvent*e,SoKeyboardEvent::KeywhichKey)
Returns whether the passed event is a keyboard press or release event of the passed key. When
SoKeyboardEvent::ANY is passed, this returns TRUE if the event represents a keyboard press or release
of any key.
chargetPrintableCharacter()const
Convenience routine that returns the character representing the key, if it's printable. If not, this
returns NULL ('\0').
Name
SoKeyboardEvent — keyboard key press and release events
See Also
SoEvent,SoButtonEvent,SoLocation2Event,SoMotion3Event,SoMouseButtonEvent,SoSpaceballButtonEvent,SoHandleEventAction,SoEventCallback,SoSelection,SoInteraction,SoXtDeviceSoKeyboardEvent(3IV)()
Synopsis
#include<Inventor/events/SoKeyboardEvent.h>#defineSO_KEY_PRESS_EVENT(EVENT,KEY)(SoKeyboardEvent::isKeyPressEvent(EVENT,SoKeyboardEvent::KEY))#defineSO_KEY_RELEASE_EVENT(EVENT,KEY)(SoKeyboardEvent::isKeyReleaseEvent(EVENT,SoKeyboardEvent::KEY))enumKey{SoKeyboardEvent::ANY Special constant for any key
SoKeyboardEvent::LEFT_SHIFT Modifiers
SoKeyboardEvent::RIGHT_SHIFTSoKeyboardEvent::LEFT_CONTROLSoKeyboardEvent::RIGHT_CONTROLSoKeyboardEvent::LEFT_ALTSoKeyboardEvent::RIGHT_ALTSoKeyboardEvent::NUMBER_0 Numbers
SoKeyboardEvent::NUMBER_1SoKeyboardEvent::NUMBER_2SoKeyboardEvent::NUMBER_3SoKeyboardEvent::NUMBER_4SoKeyboardEvent::NUMBER_5SoKeyboardEvent::NUMBER_6SoKeyboardEvent::NUMBER_7SoKeyboardEvent::NUMBER_8SoKeyboardEvent::NUMBER_9SoKeyboardEvent::A Letters
SoKeyboardEvent::BSoKeyboardEvent::CSoKeyboardEvent::DSoKeyboardEvent::ESoKeyboardEvent::FSoKeyboardEvent::GSoKeyboardEvent::HSoKeyboardEvent::ISoKeyboardEvent::JSoKeyboardEvent::KSoKeyboardEvent::LSoKeyboardEvent::MSoKeyboardEvent::NSoKeyboardEvent::OSoKeyboardEvent::PSoKeyboardEvent::QSoKeyboardEvent::RSoKeyboardEvent::SSoKeyboardEvent::TSoKeyboardEvent::USoKeyboardEvent::VSoKeyboardEvent::WSoKeyboardEvent::XSoKeyboardEvent::YSoKeyboardEvent::ZSoKeyboardEvent::HOME Cursor control and motion
SoKeyboardEvent::LEFT_ARROWSoKeyboardEvent::UP_ARROWSoKeyboardEvent::RIGHT_ARROWSoKeyboardEvent::DOWN_ARROWSoKeyboardEvent::PAGE_UPSoKeyboardEvent::PAGE_DOWNSoKeyboardEvent::PRIORSoKeyboardEvent::NEXTSoKeyboardEvent::ENDSoKeyboardEvent::PAD_ENTER Keypad functions
SoKeyboardEvent::PAD_F1SoKeyboardEvent::PAD_F2SoKeyboardEvent::PAD_F3SoKeyboardEvent::PAD_F4SoKeyboardEvent::PAD_0SoKeyboardEvent::PAD_1SoKeyboardEvent::PAD_2SoKeyboardEvent::PAD_3SoKeyboardEvent::PAD_4SoKeyboardEvent::PAD_5SoKeyboardEvent::PAD_6SoKeyboardEvent::PAD_7SoKeyboardEvent::PAD_8SoKeyboardEvent::PAD_9SoKeyboardEvent::PAD_ADDSoKeyboardEvent::PAD_SUBTRACTSoKeyboardEvent::PAD_MULTIPLYSoKeyboardEvent::PAD_DIVIDESoKeyboardEvent::PAD_SPACESoKeyboardEvent::PAD_TABSoKeyboardEvent::PAD_INSERTSoKeyboardEvent::PAD_DELETESoKeyboardEvent::PAD_PERIODSoKeyboardEvent::F1 Function keys
SoKeyboardEvent::F2SoKeyboardEvent::F3SoKeyboardEvent::F4SoKeyboardEvent::F5SoKeyboardEvent::F6SoKeyboardEvent::F7SoKeyboardEvent::F8SoKeyboardEvent::F9SoKeyboardEvent::F10SoKeyboardEvent::F11SoKeyboardEvent::F12SoKeyboardEvent::BACKSPACE Miscellaneous
SoKeyboardEvent::TABSoKeyboardEvent::RETURNSoKeyboardEvent::ENTERSoKeyboardEvent::PAUSESoKeyboardEvent::SCROLL_LOCKSoKeyboardEvent::ESCAPESoKeyboardEvent::DELETESoKeyboardEvent::PRINTSoKeyboardEvent::INSERTSoKeyboardEvent::NUM_LOCKSoKeyboardEvent::CAPS_LOCKSoKeyboardEvent::SHIFT_LOCKSoKeyboardEvent::SPACESoKeyboardEvent::APOSTROPHESoKeyboardEvent::COMMASoKeyboardEvent::MINUSSoKeyboardEvent::PERIODSoKeyboardEvent::SLASHSoKeyboardEvent::SEMICOLONSoKeyboardEvent::EQUALSoKeyboardEvent::BRACKETLEFTSoKeyboardEvent::BACKSLASHSoKeyboardEvent::BRACKETRIGHTSoKeyboardEvent::GRAVE}
Methods from class SoKeyboardEvent:
SoKeyboardEvent()staticSoTypegetClassTypeId()voidsetKey(SoKeyboardEvent::KeywhichKey)SoKeyboardEvent::KeygetKey()conststaticSbBoolisKeyPressEvent(constSoEvent*e,SoKeyboardEvent::KeywhichKey)staticSbBoolisKeyReleaseEvent(constSoEvent*e,SoKeyboardEvent::KeywhichKey)chargetPrintableCharacter()const
Methods from class SoButtonEvent:
voidsetState(SoButtonEvent::States)SoButtonEvent::StategetState()const
Methods from class SoEvent:
virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvoidsetTime(SbTimet)SbTimegetTime()constvoidsetPosition(constSbVec2s&p)constSbVec2s&getPosition()constconstSbVec2s&getPosition(constSbViewportRegion&vpRgn)constconstSbVec2f&getNormalizedPosition(constSbViewportRegion&vpRgn)constvoidsetShiftDown(SbBoolisDown)voidsetCtrlDown(SbBoolisDown)voidsetAltDown(SbBoolisDown)SbBoolwasShiftDown()constSbBoolwasCtrlDown()constSbBoolwasAltDown()const