PROTOCOLS
InputDevice
Defined in fuchsia.input.report/device.fidl
An InputDevice driver represents a single physical input device.
The InputDevice maintains an internal FIFO of MAX_DEVICE_REPORT_COUNT
reports for each client that connects. Reports are removed from the FIFO
once they are read by the client. If the FIFO is full, it will drop the
oldest report to make room for an incoming report.
GetDescriptor
Gets the device descriptor for this device.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
descriptor |
DeviceDescriptor
|
GetFeatureReport
Get the feature report for a given device. This requests the state of the device's features.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
InputDevice_GetFeatureReport_Result
|
GetInputReport
For general cases, InputReportReader is the preferred way of getting
InputReports. For devices that don't send InputReports naturally, this
method can be used to request a report from the device type indicated.
Does not block, and returns ZX_ERR_NOT_SUPPORTED if GetInputReport or
device_type are not supported.
Request
| Name | Type |
|---|---|
device_type |
DeviceType
|
Response
| Name | Type |
|---|---|
payload |
InputDevice_GetInputReport_Result
|
GetInputReportsReader
Open a new InputReportsReader on this device. Each reader receives their own reports.
Request
| Name | Type |
|---|---|
reader |
server_end:InputReportsReader
|
SendOutputReport
Send a single output report to the device. This will throw an error if the output report does not follow the OutputDescriptor.
Request
| Name | Type |
|---|---|
report |
OutputReport
|
Response
| Name | Type |
|---|---|
payload |
InputDevice_SendOutputReport_Result
|
SetFeatureReport
Set the feature report for a given device. This sets the state of the device's features.
Request
| Name | Type |
|---|---|
report |
FeatureReport
|
Response
| Name | Type |
|---|---|
payload |
InputDevice_SetFeatureReport_Result
|
InputReportsReader
Defined in fuchsia.input.report/device.fidl
Each InputReportsReader has its own FIFO of InputReports that it maintains.
When ReadInputReports is called it drains the InputReports FIFO.
If too many InputReports are created before the FIFO is drained, then
the oldest InputReport will be silently discarded.
ReadInputReports
This is a Hanging-Get function to read the reports in the InputReport FIFO. This will not reply until there is at least one report available. If there is already one outstanding Hanging-Get, calling this again will return ZX_ERR_ALREADY_BOUND.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
payload |
InputReportsReader_ReadInputReports_Result
|
STRUCTS
Axis
Defined in fuchsia.input.report/units.fidl
An Axis is defined as a range and a unit.
| Field | Type | Description | Default |
|---|---|---|---|
range |
Range
|
No default | |
unit |
Unit
|
No default |
InputDevice_GetFeatureReport_Response
Defined in fuchsia.input.report/device.fidl
| Field | Type | Description | Default |
|---|---|---|---|
report |
FeatureReport
|
No default |
InputDevice_GetInputReport_Response resource
Defined in fuchsia.input.report/device.fidl
| Field | Type | Description | Default |
|---|---|---|---|
report |
InputReport
|
No default |
InputDevice_SendOutputReport_Response
Defined in fuchsia.input.report/device.fidl
<EMPTY>
InputDevice_SetFeatureReport_Response
Defined in fuchsia.input.report/device.fidl
<EMPTY>
InputReportsReader_ReadInputReports_Response resource
Defined in fuchsia.input.report/device.fidl
| Field | Type | Description | Default |
|---|---|---|---|
reports |
vector<InputReport>:50
|
No default |
Range
Defined in fuchsia.input.report/units.fidl
Describe a Range of values.
| Field | Type | Description | Default |
|---|---|---|---|
min |
int64
|
No default | |
max |
int64
|
No default |
SensorAxis
Defined in fuchsia.input.report/sensor.fidl
A SensorAxis is a normal Axis with an additional SensorType to describe what the
axis is measuring.
| Field | Type | Description | Default |
|---|---|---|---|
axis |
Axis
|
No default | |
type |
SensorType
|
No default |
Unit
Defined in fuchsia.input.report/units.fidl
Describes a given unit by giving the unit and the unit's exponent. E.g: Nanometers would have type METERS and exponent -9.
| Field | Type | Description | Default |
|---|---|---|---|
type |
UnitType
|
No default | |
exponent |
int32
|
No default |
ENUMS
ConsumerControlButton flexible
Type: uint32
Defined in fuchsia.input.report/consumer_control.fidl
These ControlButtons represent on/off buttons whose purpose is to change the host's configuration.
| Name | Value | Description |
|---|---|---|
VOLUME_UP |
1 |
This button represents increasing volume. |
VOLUME_DOWN |
2 |
This button represents decreasing volume. |
PAUSE |
3 |
This button represents pausing. |
FACTORY_RESET |
4 |
This button represents factory resetting the host. |
MIC_MUTE |
5 |
This button represents muting the microphone on the host. |
REBOOT |
6 |
This button represents rebooting the host. |
CAMERA_DISABLE |
7 |
This button represents disabling the camera on the host. |
FUNCTION |
8 |
This button represents a function. |
POWER |
9 |
This button represents a power button. |
DeviceType flexible
Type: uint32
Defined in fuchsia.input.report/device.fidl
The InputReport field to be populated by InputDevice.GetInputReport.
| Name | Value | Description |
|---|---|---|
MOUSE |
0 |
|
SENSOR |
1 |
|
TOUCH |
2 |
|
KEYBOARD |
3 |
|
CONSUMER_CONTROL |
4 |
LedType flexible
Type: uint32
Defined in fuchsia.input.report/led.fidl
An LedType represents an LED on a device that can be turned on or off. When applicable, the definition of each LED is derived from one of the following sources albeit with a Fuchsia-specific numeric value:
- USB HID usage codes for usage page 0x0008 (LED)
| Name | Value | Description |
|---|---|---|
NUM_LOCK |
1 |
LED to indicate a Keyboard's number lock is enabled. Corresponds to USB HID page 0x0008 usage 0x0001 |
CAPS_LOCK |
2 |
LED to indicate a Keyboard's capital lock is enabled. Corresponds to USB HID page 0x0008 usage 0x0002 |
SCROLL_LOCK |
3 |
LED to indicate a Keyboard's scroll lock is enabled. Corresponds to USB HID page 0x0008 usage 0x0003 |
COMPOSE |
4 |
LED to indicate a Keyboard's composition mode is enabled. Corresponds to USB HID page 0x0008 usage 0x0004 |
KANA |
5 |
LED to indicate a Keyboard's Kana mode is enabled. Corresponds to USB HID page 0x0008 usage 0x0005 |
SensorReportingState flexible
Type: uint32
Defined in fuchsia.input.report/sensor.fidl
SensorReportingState determines when a sensor will send reports.
| Name | Value | Description |
|---|---|---|
REPORT_NO_EVENTS |
1 |
No events will be sent from the sensor. |
REPORT_ALL_EVENTS |
2 |
All events will be sent from the sensor. For most sensors, this
frequency can be set by |
REPORT_THRESHOLD_EVENTS |
3 |
Only events that cross a threshold will be reported. |
SensorType flexible
Type: uint32
Defined in fuchsia.input.report/sensor.fidl
Each sensor value has a corresponding SensorType, which explains what the value is measuring in the world.
| Name | Value | Description |
|---|---|---|
ACCELEROMETER_X |
1 |
Acceleration on the X axis. |
ACCELEROMETER_Y |
2 |
Acceleration on the Y axis. |
ACCELEROMETER_Z |
3 |
Acceleration on the Z axis. |
MAGNETOMETER_X |
4 |
Strength of the Magnetic Field in the X axis. |
MAGNETOMETER_Y |
5 |
Strength of the Magnetic Field in the Y axis. |
MAGNETOMETER_Z |
6 |
Strength of the Magnetic Field in the Z axis. |
GYROSCOPE_X |
7 |
Angular Velocity in the X direction moving counter-clockwise. |
GYROSCOPE_Y |
8 |
Angular Velocity in the Y direction moving counter-clockwise. |
GYROSCOPE_Z |
9 |
Angular Velocity in the Z direction moving counter-clockwise. |
LIGHT_ILLUMINANCE |
10 |
Ambient level of Light. |
LIGHT_RED |
11 |
Ambient level of Red Light. |
LIGHT_GREEN |
12 |
Ambient level of Green Light. |
LIGHT_BLUE |
13 |
Ambient level of Blue Light. |
TouchButton flexible
Type: uint8
Defined in fuchsia.input.report/touch.fidl
| Name | Value | Description |
|---|---|---|
PALM |
1 |
Represents palm on touchscreen. |
SWIPE_UP |
2 |
Represents a swipe up gesture on the touchscreen. Added: 31
|
SWIPE_LEFT |
3 |
Represents a swipe left gesture on the touchscreen. Added: 31
|
SWIPE_RIGHT |
4 |
Represents a swipe right gesture on the touchscreen. Added: 31
|
SWIPE_DOWN |
5 |
Represents a swipe down gesture on the touchscreen. Added: 31
|
TouchConfigurationInputMode flexible
Type: uint32
Defined in fuchsia.input.report/touch.fidl
Input mode indicating which top-level collection should be used for input reporting. These values must correspond to the input modes defined in 16.7 of the HID Usage Tables for Universal Serial Bus (USB) Spec (https://usb.org/sites/default/files/hut1_22.pdf).
| Name | Value | Description |
|---|---|---|
MOUSE_COLLECTION |
0 |
Use the Mouse Collection for reporting data. |
WINDOWS_PRECISION_TOUCHPAD_COLLECTION |
3 |
Use the Windows Precision Touchpad Collection for reporting data. Defined by Windows Precision Touchpad Required HID Top-Level Collections: https://docs.microsoft.com/ en-us/windows-hardware/design/component-guidelines/windows-precision-touchpad-required -hid-top-level-collections). |
TouchType flexible
Type: uint32
Defined in fuchsia.input.report/touch.fidl
The device type from which the touch originated.
| Name | Value | Description |
|---|---|---|
TOUCHSCREEN |
1 |
A touch screen has direct finger input associated with a display. |
TOUCHPAD |
2 |
A touch pad is a pointer device that tracks finger positions. |
UnitType flexible
Type: uint32
Defined in fuchsia.input.report/units.fidl
This provides an easy, standardized way to specify units. New units can be added as needed. Each UnitType should be named after a specific unit that should be fully distinguished by the name (E.g: Use METERS instead of DISTANCE). More complicated units that need to be differentiated should begin with SI_ (for Internation System of Units) or ENGLISH_ (for English System of Units).
| Name | Value | Description |
|---|---|---|
NONE |
0 |
The device did not specify units. |
OTHER |
1 |
The device specified units that are not convertible to any of the other units. |
METERS |
2 |
A measurement of distance in meters. |
GRAMS |
3 |
A measurement of mass in grams. |
DEGREES |
4 |
A measurement of rotation in degrees. |
ENGLISH_ANGULAR_VELOCITY |
5 |
A measurement of angular velocity in degrees per second. |
SI_LINEAR_VELOCITY |
6 |
A measurement of linear velocity in meters per second. |
SI_LINEAR_ACCELERATION |
7 |
A measurement of acceleration in meters per second squared. |
WEBERS |
8 |
A measure of magnetic flux in webers. |
CANDELAS |
9 |
A measurement of luminous intensity in candelas. |
PASCALS |
10 |
A measurement of pressure in pascals. |
LUX |
11 |
|
SECONDS |
12 |
VendorGoogleProductId flexible
Type: uint32
Defined in fuchsia.input.report/device_ids.fidl
Below are ProductIds which represents which product this Input device represents. If the Input device is a HID device, the ProductId maps directly to the HID ProductId. If the Input device is not a HID device, then the ProductId will be greater than 0xFFFF, which is the max HID ProductId.
| Name | Value | Description |
|---|---|---|
FOCALTECH_TOUCHSCREEN |
65537 |
Below are the non-HID VendorIds |
AMS_LIGHT_SENSOR |
65538 |
|
PC_PS2_KEYBOARD |
65539 |
|
PC_PS2_MOUSE |
65540 |
|
ADC_BUTTONS |
65541 |
Added: HEAD
|
GOODIX_TOUCHSCREEN |
65542 |
Added: HEAD
|
HID_BUTTONS |
65543 |
Added: HEAD
|
VIRTIO_MOUSE |
65544 |
Added: HEAD
|
VIRTIO_KEYBOARD |
65545 |
Added: HEAD
|
VIRTIO_TOUCHSCREEN |
65546 |
Added: HEAD
|
GOLDFISH_ACCELERATION_SENSOR |
2417819649 |
|
GOLDFISH_GYROSCOPE_SENSOR |
2417819650 |
|
GOLDFISH_RGBC_LIGHT_SENSOR |
2417819651 |
VendorId flexible
Type: uint32
Defined in fuchsia.input.report/device_ids.fidl
The VendorId represents the vendor that created this Input device. If the Input device is a HID device, the VendorId maps directly to the HID VendorId. If the Input device is not a HID device, then the VendorId will be greater than 0xFFFF, which is the max HID VendorId.
| Name | Value | Description |
|---|---|---|
6353 |
Below are the HID VendorIds, range 0x0000 - 0xFFFF. |
TABLES
ConsumerControlDescriptor
Defined in fuchsia.input.report/consumer_control.fidl
A Fuchsia ConsumerControl represents a device thats purpose is to change values on the host. Typical controls are Volume, Power, Media Playback. (Consider a TV remote to be a typical ConsumerControl).
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
input |
ConsumerControlInputDescriptor
|
ConsumerControlInputDescriptor
Defined in fuchsia.input.report/consumer_control.fidl
Describes the format of the input report that will be sent from the ConsumerControl device to the host.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
buttons |
vector<ConsumerControlButton>:255
|
The list of buttons that this device contains. |
ConsumerControlInputReport
Defined in fuchsia.input.report/consumer_control.fidl
A single report created by a ConsumerControl device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
pressed_buttons |
vector<ConsumerControlButton>:255
|
The list of buttons that are currently pressed down. |
ContactInputDescriptor
Defined in fuchsia.input.report/touch.fidl
ContactInputDescriptor describes the fields associated with a touch on a touch device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
position_x |
Axis
|
Describes the reporting of the x-axis. Required. |
2 |
position_y |
Axis
|
Describes the reporting of the y-axis. Required. |
3 |
pressure |
Axis
|
Pressure of the contact. Optional. |
4 |
contact_width |
Axis
|
Width of the area of contact. Optional. |
5 |
contact_height |
Axis
|
Height of the area of contact. Optional. |
ContactInputReport
Defined in fuchsia.input.report/touch.fidl
ContactInputReport describes one touch on a touch device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
contact_id |
uint32
|
Identifier for this contact. Required. |
2 |
position_x |
int64
|
A contact's position on the x axis. Required. |
3 |
position_y |
int64
|
A contact's position on the y axis. Required. |
4 |
pressure |
int64
|
Pressure of the contact. Required iff |
5 |
contact_width |
int64
|
Width of the bounding box around the touch contact. Combined with
Required iff |
6 |
contact_height |
int64
|
Height of the bounding box around the touch contact. Combined with
Required iff |
7 |
confidence |
bool
|
Also known as touch valid. Indicates the device’s confidence that the touch contact was an intended, valid contact. The device should report 0 if the contact is not a valid touch. The device should report 1 if the contact is intended and valid (e.g. a pointing touch). Optional. |
DeviceDescriptor
Defined in fuchsia.input.report/descriptor.fidl
DeviceDescriptor describes a physical input device. Some physical devices may
send multiple types of reports (E.g: a physical touchscreen can send touch and
stylus reports, so it will have both a TouchDescriptor and a StylusDescriptor).
| Ordinal | Field | Type | Description |
|---|---|---|---|
2 |
mouse |
MouseDescriptor
|
Describes the mouse part of the device. Optional. Present iff the device is/has a mouse. |
3 |
sensor |
SensorDescriptor
|
Describes the sensor part of the device. Optional. Present iff the device is/has a sensor. |
4 |
touch |
TouchDescriptor
|
Describes the touch part (such as a touchscreen or touchpad) of the device. Optional. Present iff the device is/has a touch device. |
5 |
keyboard |
KeyboardDescriptor
|
Describes the keyboard part of the device. Optional. Present iff the device is/has a keyboard. |
6 |
consumer_control |
ConsumerControlDescriptor
|
Describes the consumer control part of the device. Optional. Present iff the device is/has a consumer control device. |
7 |
device_information |
DeviceInformation
|
Identifies the physical device. Required. |
DeviceInformation
Defined in fuchsia.input.report/descriptor.fidl
DeviceInformation provides more information about the device and lets a client distinguish between devices (e.g between two touchscreens that come from different vendors). If the device is a HID device, then the id information will come from the device itself. Other, non-HID devices may assign the ids in the driver, so it will be the driver author's responsibility to assign sensible ids.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
vendor_id |
uint32
|
Required. |
2 |
product_id |
uint32
|
Required. |
3 |
version |
uint32
|
Optional. |
4 |
polling_rate |
zx/Duration
|
The time interval between each poll of the device. Optional. |
5 |
manufacturer_name |
string:256
|
Human-readable name of the manufacturer. Optional. Must be non-empty if present. Added: HEAD
|
6 |
product_name |
string:256
|
Human-readable name of the product. Optional. Must be non-empty if present. Added: HEAD
|
7 |
serial_number |
string:256
|
Serial number of the device. Optional. Must be non-empty if present. Added: HEAD
|
FeatureReport
Defined in fuchsia.input.report/report.fidl
A single report containing the feature information for an input device. Feature reports obtained from the device show the current state of the device. Sending a feature report to the device sets the device in that state.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
sensor |
SensorFeatureReport
|
Optional. Present iff the device is/has a sensor. |
2 |
touch |
TouchFeatureReport
|
Optional. Present iff the device is/has a touch device. |
InputReport resource
Defined in fuchsia.input.report/report.fidl
An InputReport is a single report that is created by an input device.
An InputReport can contain one of many different report types. The report
types are not mutually exclusive. The event_time is the time in
nanoseconds when the report was generated.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
event_time |
zx/Time
|
The monotonic time when the event was generated. Required. |
2 |
mouse |
MouseInputReport
|
Optional. Present iff the device reports mouse input. |
3 |
trace_id |
uint64
|
Unique ID to connect trace async begin/end events. Optional. |
4 |
sensor |
SensorInputReport
|
Optional. Present iff the device reports sensor input. |
5 |
touch |
TouchInputReport
|
Optional. Present iff the device reports touch input. |
6 |
keyboard |
KeyboardInputReport
|
Optional. Present iff the device reports keyboard input. |
7 |
consumer_control |
ConsumerControlInputReport
|
Optional. Present iff the device reports consumer control input. |
8 |
report_id |
uint8
|
A device may have multiple input descriptors of the same type. This field specifies which descriptor this InputReport corresponds to. Omitted if the device has no more than one descriptor for each type. Optional. |
9 |
wake_lease |
handle<eventpair>
|
Optional wake lease for power baton passing. Added: HEAD
|
KeyboardDescriptor
Defined in fuchsia.input.report/keyboard.fidl
The capabilities of a keyboard device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
input |
KeyboardInputDescriptor
|
Required. |
2 |
output |
KeyboardOutputDescriptor
|
Optional. Present iff the keyboard supports output. |
KeyboardInputDescriptor
Defined in fuchsia.input.report/keyboard.fidl
Describes the format of the input report that will be sent from the keyboard to the device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
2 |
keys3 |
vector<fuchsia.input/Key>:256
|
The list of keys that this keyboard contains. Must be non-empty. Required. |
KeyboardInputReport
Defined in fuchsia.input.report/keyboard.fidl
A single report created by a keyboard device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
2 |
pressed_keys3 |
vector<fuchsia.input/Key>:256
|
The list of keys that are currently pressed down. Required. Empty iff no keys are pressed. |
KeyboardOutputDescriptor
Defined in fuchsia.input.report/keyboard.fidl
Describes the format of the output report that can be sent to the keyboard.
At least one of the fields below must be present.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
leds |
vector<LedType>:256
|
The list of keyboard LEDs that can be toggled. Optional. Present iff the device has LEDs. |
KeyboardOutputReport
Defined in fuchsia.input.report/keyboard.fidl
A single report containing output information for a keyboard.
At least one of the fields below must be present.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
enabled_leds |
vector<LedType>:256
|
The device's LEDs will be on iff contained in this list. Optional. Present iff |
MouseDescriptor
Defined in fuchsia.input.report/mouse.fidl
The capabilities of a mouse device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
input |
MouseInputDescriptor
|
Describes the input capabilities of the device. Required. |
MouseInputDescriptor
Defined in fuchsia.input.report/mouse.fidl
Describes the format of the input report that will be sent from the mouse to the device.
At least one of the fields below must be present.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
movement_x |
Axis
|
The range of relative X movement. Optional. Present iff the mouse reports relative X movement. |
2 |
movement_y |
Axis
|
The range of relative Y movement. Optional. Present iff the mouse reports relative Y movement. |
3 |
scroll_v |
Axis
|
The range of relative vertical scroll. Optional. Present iff the mouse reports relative vertical scroll. |
4 |
scroll_h |
Axis
|
The range of relative horizontal scroll. Optional. Present iff the mouse reports relative horizontal scroll. |
5 |
buttons |
vector<uint8>:32
|
IDs of the mouse buttons. Optional. Present iff the mouse reports button state. Must be non-empty if present. |
6 |
position_x |
Axis
|
The range of the position of X. The main use of position is from virtual mice like over VNC. Optional. Present iff the mouse reports absolute X position. |
7 |
position_y |
Axis
|
The range of the position of Y. The main use of position is from virtual mice like over VNC. Optional. Present iff the mouse reports absolute Y position. |
MouseInputReport
Defined in fuchsia.input.report/mouse.fidl
MouseReport gives the relative movement of the mouse and currently
pressed buttons. Relative means the movement seen between the previous
report and this report. The client is responsible for tracking this and
converting it to absolute movement.
At least one of the fields below must be present.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
movement_x |
int64
|
Relative X positional displacement. Optional. Present iff the mouse reports relative X movement.
Must not co-exist with |
2 |
movement_y |
int64
|
Relative Y positional displacement. Optional. Present iff the mouse reports relative Y movement.
Must not co-exist with |
3 |
scroll_v |
int64
|
Relative vertical scrolling displacement. Optional. Present iff the mouse reports relative vertical scroll. |
4 |
scroll_h |
int64
|
Relative horizontal scrolling displacement. Optional. Present iff the mouse reports relative horizontal scroll. |
5 |
pressed_buttons |
vector<uint8>:32
|
A list of currently pressed buttons. Optional. Empty iff no button is pressed. Present iff the mouse reports button state. |
6 |
position_x |
int64
|
The position of X. The main use of position is from virtual mice like over VNC. Optional. Present iff the mouse reports absolute X position.
Must not co-exist with |
7 |
position_y |
int64
|
The position of Y. The main use of position is from virtual mice like over VNC. Optional. Present iff the mouse reports absolute Y position.
Must not co-exist with |
OutputDescriptor
Defined in fuchsia.input.report/descriptor.fidl
Describes the output reports that a physical input device will accept. Output information typically represents device output to the user (E.g: LEDs, tactile feedback, etc).
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
keyboard |
KeyboardOutputDescriptor
|
Describes the keyboard output part of the device. Optional. Present iff the device is/has a keyboard. |
OutputReport
Defined in fuchsia.input.report/report.fidl
A single report containing output information for an input device. Output information typically represents device output to the user (E.g: LEDs, tactile feedback, etc).
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
keyboard |
KeyboardOutputReport
|
Optional. Present iff the device is/has a keyboard. |
SelectiveReportingFeatureReport
Defined in fuchsia.input.report/touch.fidl
Selective Reporting Feature Report indicating which types of input are reported.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
surface_switch |
bool
|
If this is true, the device will report surface contacts. |
2 |
button_switch |
bool
|
If this is true, the device will report button state. |
SensorDescriptor
Defined in fuchsia.input.report/sensor.fidl
The capabilities of a sensor device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
input |
vector<SensorInputDescriptor>:255
|
Input descriptors. Must not be empty. |
2 |
feature |
vector<SensorFeatureDescriptor>:255
|
Feature descriptors. Optional. Present iff sensor supports getting/setting features of the sensor. |
SensorFeatureDescriptor
Defined in fuchsia.input.report/sensor.fidl
Describes the format of the sensor's feature report. Feature reports can be requested from the sensor, or sent to the sensor.
At least one of the fields below must be present.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
report_interval |
Axis
|
Valid range of the reporting interval for the given Optional. Present iff sensor supports getting/setting the reporting interval. |
2 |
sensitivity |
vector<SensorAxis>:100
|
Valid range of the sensitivity for the given Optional. Present iff sensor supports getting/setting the sensitivity. |
3 |
supports_reporting_state |
bool
|
True iff Optional. Present iff sensor supports getting/setting the reporting state. |
4 |
threshold_high |
vector<SensorAxis>:100
|
Valid range of the high threshold values for the given Optional. Present iff sensor supports getting/setting the high threshold values. |
5 |
threshold_low |
vector<SensorAxis>:100
|
Valid range of the low threshold values for the given Optional. Present iff sensor supports getting/setting the low threshold values. |
6 |
sampling_rate |
Axis
|
Valid range of sampling rates this sensor supports. Optional. Present iff sensor supports getting/setting the sampling rate. |
7 |
report_id |
uint8
|
A sensor may have multiple feature descriptors of the same type. Reports with the same report ID are associated with this descriptor. Required iff the sensor has more than one feature descriptors. |
SensorFeatureReport
Defined in fuchsia.input.report/sensor.fidl
A SensorFeatureReport describes the features of a given sensor. If a FeatureReport is sent to the Input Device it sets the configuration of the device. If a FeatureReport is requested from the Input Device it shows the device's current configuration.
At least one of the fields below must be present.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
report_interval |
int64
|
The time between reports sent by the sensor, in microseconds. Must fall within the range specified in the descriptor's Optional. |
2 |
sensitivity |
vector<int64>:100
|
The sensitivity for various Must fall within the range specified in the descriptor's Optional. |
3 |
reporting_state |
SensorReportingState
|
Determines when the sensor will send reports. Optional. |
4 |
threshold_high |
vector<int64>:100
|
The high thresholds for various Must fall within the range specified in the descriptor's Optional. |
5 |
threshold_low |
vector<int64>:100
|
The low thresholds for various Optional. |
6 |
sampling_rate |
int64
|
The rate at which the sensor is sampled. Optional. |
SensorInputDescriptor
Defined in fuchsia.input.report/sensor.fidl
Describes the format of the input report that will be sent from the sensor to the device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
values |
vector<SensorAxis>:100
|
Describes the ranges of the values that the sensor device reports. Must not be empty. Required. |
2 |
report_id |
uint8
|
A sensor may have multiple input descriptors of the same type. Reports with the same report ID are associated with this descriptor. Required iff the sensor has more than one input descriptors. |
SensorInputReport
Defined in fuchsia.input.report/sensor.fidl
SensorReport gives the values measured by a sensor at a given point in time.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
values |
vector<int64>:100
|
The size and ordering of Required. |
TouchDescriptor
Defined in fuchsia.input.report/touch.fidl
The capabilities of a touch device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
input |
TouchInputDescriptor
|
Input descriptors. Required. |
2 |
feature |
TouchFeatureDescriptor
|
Feature descriptors. Optional. Present iff the touch device has getable/setable features. |
TouchFeatureDescriptor
Defined in fuchsia.input.report/touch.fidl
Describes the format of the touchpad configuration's feature report. Feature reports can be requested from the touchpad, or sent to the touchpad.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
supports_input_mode |
bool
|
Indicates whether or not touch feature descriptor supports different input modes. |
2 |
supports_selective_reporting |
bool
|
Indicates whether or not touch feature descriptor supports selective reporting. |
TouchFeatureReport
Defined in fuchsia.input.report/touch.fidl
A TouchFeatureReport describes the features of a given touch device. If a FeatureReport is sent to the Input Device it sets the configuration of the device. If a FeatureReport is requested from the Input Device it shows the device's current configuration.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
input_mode |
TouchConfigurationInputMode
|
The input mode currently reporting. |
2 |
selective_reporting |
SelectiveReportingFeatureReport
|
The current report types being reported. |
TouchInputDescriptor
Defined in fuchsia.input.report/touch.fidl
Describes the format of the input report that will be sent from the keyboard to the device.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
contacts |
vector<ContactInputDescriptor>:10
|
The contact descriptors associated with this touch descriptor. Required. Must not be empty. |
2 |
max_contacts |
uint32
|
The max number of contacts that this touch device can report at once. Required. |
3 |
touch_type |
TouchType
|
The type of touch device being used. Required. |
4 |
buttons |
vector<TouchButton>:10
|
Added: 28
|
TouchInputReport
Defined in fuchsia.input.report/touch.fidl
TouchInputReport describes the current contacts recorded by the touchscreen.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
contacts |
vector<ContactInputReport>:10
|
The contacts currently being reported by the device. Required. Empty iff there is no active contact. |
2 |
pressed_buttons |
vector<TouchButton>:10
|
Added: 28
|
UNIONS
InputDevice_GetFeatureReport_Result strict
Defined in fuchsia.input.report/device.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
InputDevice_GetFeatureReport_Response
|
|
2 |
err |
zx/Status
|
InputDevice_GetInputReport_Result strict resource
Defined in fuchsia.input.report/device.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
InputDevice_GetInputReport_Response
|
|
2 |
err |
zx/Status
|
InputDevice_SendOutputReport_Result strict
Defined in fuchsia.input.report/device.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
InputDevice_SendOutputReport_Response
|
|
2 |
err |
zx/Status
|
InputDevice_SetFeatureReport_Result strict
Defined in fuchsia.input.report/device.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
InputDevice_SetFeatureReport_Response
|
|
2 |
err |
zx/Status
|
InputReportsReader_ReadInputReports_Result strict resource
Defined in fuchsia.input.report/device.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
InputReportsReader_ReadInputReports_Response
|
|
2 |
err |
zx/Status
|
CONSTANTS
| Name | Value | Type | Description |
|---|---|---|---|
| CONSUMER_CONTROL_MAX_NUM_BUTTONS |
255
|
uint32 |
Hardcoded max sizes for ConsumerControl vectors. These sizes should be increased if we ever see a device with more objects than can be represented. |
| KEYBOARD_MAX_NUM_KEYS |
256
|
uint32 |
Hardcoded max sizes for keyboard vectors. These sizes should be increased if we ever see keyboards with more objects than can be represented. |
| KEYBOARD_MAX_NUM_LEDS |
256
|
uint32 |
|
| KEYBOARD_MAX_PRESSED_KEYS |
256
|
uint32 |
|
| MAX_DEVICE_REPORT_COUNT |
50
|
uint32 |
|
| MAX_NAME_LENGTH |
256
|
uint32 |
Added: HEAD
|
| MAX_REPORT_COUNT |
255
|
uint32 |
A hardcoded number of max reports. Because report ID is only 8 bits, only 255 different reports are allowed at a time. |
| MOUSE_MAX_NUM_BUTTONS |
32
|
uint32 |
A hardcoded number of max mouse buttons. This should be increased in the future if we ever see mice with more buttons. |
| SENSOR_MAX_VALUES |
100
|
uint32 |
A hardcoded number of max sensor values. This should be increased in the future if we ever see a sensor with more values. |
| TOUCH_MAX_CONTACTS |
10
|
uint32 |
A hardcoded number of max contacts per report. This should be increased in the future if we see devices with more than the max amount. |
| TOUCH_MAX_NUM_BUTTONS |
10
|
uint32 |
SERVICES
Service
Defined in fuchsia.input.report/device.fidl
| Name | Type | Transport |
|---|---|---|
| input_device |
fuchsia.input.report/InputDevice
|
Channel |