Defines input events and associated data types.
Enums
SbInputDeviceType
Identifies possible input device types. The events produced by each device type
correspond to SbInputEventType values.
Values
kSbInputDeviceTypeGestureInput from a gesture-detection mechanism. Examples include Kinect and Wiimotes.
Produces
Move,PressandUnpressevents.kSbInputDeviceTypeGamepadInput from a gamepad, following the layout provided in the W3C Web Gamepad API.
Produces
Move,PressandUnpressevents.kSbInputDeviceTypeKeyboardKeyboard input from a traditional keyboard or game controller chatpad.
Produces
PressandUnpressevents.kSbInputDeviceTypeMouseInput from a traditional mouse.
Produces
Move,Press, andUnpressevents.kSbInputDeviceTypeRemoteInput from a TV remote-control-style device.
Produces
PressandUnpressevents.kSbInputDeviceTypeTouchScreenInput from a single- or multi-touchscreen.
Produces
Move,Press, andUnpressevents.kSbInputDeviceTypeTouchPadInput from a touchpad that is not masquerading as a mouse.
Produces
Move,Press, andUnpressevents.kSbInputDeviceTypeOnScreenKeyboardKeyboard input from an on-screen keyboard.
Produces
Inputevents.
SbInputEventType
The action that an input event represents.
Values
kSbInputEventTypeMoveDevice movement. For
MouseandGesturedevices, movement tracks an absolute cursor position. ForTouchPaddevices, only relative movement is provided.kSbInputEventTypePressKey or button press. This can be a keyboard key, mouse or game controller button, touchscreen press, or gesture. An
Unpressevent is dispatched when thePressevent terminates (for example, when releasing the key or raising the finger). The client is responsible for generating repeat press events.kSbInputEventTypeUnpressKey or button release. The counterpart to
Press, this event is sent when the pressed key or button is released.kSbInputEventTypeWheelWheel movement. Provides relative movement of the
Mousewheel.kSbInputEventTypeInput
Structs
SbInputData
Event data for kSbEventTypeInput events.
Members
SbWindow windowThe window in which the input was generated.
SbInputEventType typeThe type of input event that this represents.
SbInputDeviceType device_typeThe type of device that generated this input event.
int device_idAn identifier that is unique among all connected devices.
SbKey keyAn identifier that indicates which keyboard key or mouse button was involved in this event, if any. All known keys for all devices are mapped to a single ID space, defined by the
SbKeyenum inkey.h.wchar_t characterThe character that corresponds to the key. For external keyboards, this character depends on the keyboard layout. The value is
0if there is no corresponding character.SbKeyLocation key_locationThe location of the specified key, when multiple instances of a key exist (for example, left and right "Shift" keys).
unsigned int key_modifiersKey modifiers (e.g.
Ctrl,Shift) held down during this input event.SbInputVector positionThe (x, y) coordinates of the persistent cursor controlled by this device. The value is
0if this data is not applicable. ForkSbInputEventTypeMoveevents fromkSbInputDeviceTypeGamepaddevices, this field represents stick position in the range[-1, 1], where positive values indicate down and right directions.SbInputVector deltaThe relative motion vector of this input. The value is
0if this data is not applicable.float pressureThe normalized pointer pressure in the range
[0, 1], where0and1represent minimum and maximum detectable pressure. UseNaNif the device does not report pressure. This value applies to mouse and touchscreen input events.SbInputVector sizeThe contact geometry size
(width, height)of the pointer, defining the contact area. If(NaN, NaN)is specified,(0, 0)is used. This value applies to mouse and touchscreen input events.SbInputVector tiltThe tilt angle
(x, y)in degrees, in the range[-90, 90]relative to the z-axis. Positive values indicate tilt to the right (x) and towards the user (y). Use(NaN, NaN)if the device does not report tilt. This value applies to mouse and touchscreen input events.const char * input_textThe text to input for events of type
Input.bool is_composingSet to
trueif the input event is part of an ongoing composition.
SbInputVector
A 2-dimensional vector used to represent points and motion vectors.
Members
float xfloat y