通訊協定
InputDevice
在 fuchsia.input.report/device.fidl 中定義
InputDevice 驅動程式庫代表單一實體輸入裝置。InputDevice 會為每個連線的用戶端維護 MAX_DEVICE_REPORT_COUNT 報告的內部 FIFO。用戶端讀取報表後,就會將報告從 FIFO 中移除。如果 FIFO 已滿,系統會捨棄最早的報表,以便為收到的報告騰出空間。
GetDescriptor
取得此裝置的裝置描述元。
要求
<EMPTY>
回應
| 名稱 | 類型 | 
|---|---|
| descriptor | DeviceDescriptor | 
GetFeatureReport
取得特定裝置的功能報告。這會要求裝置功能的狀態。
要求
<EMPTY>
回應
| 名稱 | 類型 | 
|---|---|
| payload | InputDevice_GetFeatureReport_Result | 
GetInputReport
一般情況下,建議您使用 InputReportReader 取得 InputReports。如果裝置不會自然傳送 InputReporting,你可以使用這個方法,從指定的裝置類型要求報表。如果不支援 GetInputReport 或 device_type,就不會封鎖,並且會傳回 ZX_ERR_NOT_SUPPORTED。
要求
| 名稱 | 類型 | 
|---|---|
| device_type | DeviceType | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | InputDevice_GetInputReport_Result | 
GetInputReportsReader
在這部裝置上開啟新的 InputReportsReader。每個讀取器都會收到自己的報表。
要求
| 名稱 | 類型 | 
|---|---|
| reader | server_end<InputReportsReader> | 
SendOutputReport
將一份輸出報告傳送至裝置。如果輸出報告不符合 OutputDescriptor,就會擲回錯誤。
要求
| 名稱 | 類型 | 
|---|---|
| report | OutputReport | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | InputDevice_SendOutputReport_Result | 
SetFeatureReport
設定裝置的功能報告。這會設定裝置功能的狀態。
要求
| 名稱 | 類型 | 
|---|---|
| report | FeatureReport | 
回應
| 名稱 | 類型 | 
|---|---|
| payload | InputDevice_SetFeatureReport_Result | 
InputReportsReader
在 fuchsia.input.report/device.fidl 中定義
每個 InputReportsReader 都有自己維護的 InputReporting。呼叫 ReadInputReports 時,會清空 InputReporting FIFO。如果在排除 FIFO 前建立過多 InputReporting,系統會以無訊息的方式捨棄最舊的 InputReport。
ReadInputReports
這是用於讀取 InputReport FIFO 報告的 hanging-Get 函式。只有在至少一個可用報告可用時,系統才會回覆。如果已有未完成的 hanging-Get,再次呼叫此方法將傳回 ZX_ERR_ALREADY_BOUND。
要求
<EMPTY>
回應
| 名稱 | 類型 | 
|---|---|
| payload | InputReportsReader_ReadInputReports_Result | 
結構
Axis
在 fuchsia.input.report/units.fidl 中定義
Axis 定義為 range 和 unit。
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| range | Range | 無預設 | |
| unit | Unit | 無預設 | 
DeviceInfo
在 fuchsia.input.report/concept.fidl 中定義
DeviceInfo 提供裝置的更多相關資訊,可讓用戶端區分裝置 (例如兩個來自不同廠商的觸控螢幕)。如果裝置是 HID 裝置,則 ID 資訊會由裝置本身提供。其他非 HID 裝置可能會指派驅動程式庫中的 ID,因此駕駛人必須負責指派合理的 ID。
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| vendor_id | uint32 | 無預設 | |
| product_id | uint32 | 無預設 | |
| version | uint32 | 無預設 | 
InputDevice_GetFeatureReport_Response
在 fuchsia.input.report/device.fidl 中定義的
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| report | FeatureReport | 無預設 | 
InputDevice_GetInputReport_Response
在 fuchsia.input.report/device.fidl 中定義的
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| report | InputReport | 無預設 | 
InputDevice_SendOutputReport_Response
在 fuchsia.input.report/device.fidl 中定義的
<EMPTY>
InputDevice_SetFeatureReport_Response
在 fuchsia.input.report/device.fidl 中定義的
<EMPTY>
InputReportsReader_ReadInputReports_Response
在 fuchsia.input.report/device.fidl 中定義的
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| reports | vector<InputReport>[50] | 無預設 | 
範圍
在 fuchsia.input.report/units.fidl 中定義
說明值的 Range。
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| min | int64 | 無預設 | |
| max | int64 | 無預設 | 
SensorAxis
在 fuchsia.input.report/sensor.fidl 中定義
SensorAxis 是一般 Axis,附帶額外的 SensorType 來描述軸正在測量的事項。
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| axis | Axis | 無預設 | |
| type | SensorType | 無預設 | 
Unit
在 fuchsia.input.report/units.fidl 中定義
提供單位和單位的指數來描述指定單位。例如:奈米儀的類型為 METERS 和指數 -9。
| 廣闊 | 類型 | 說明 | 預設 | 
|---|---|---|---|
| type | UnitType | 無預設 | |
| exponent | int32 | 無預設 | 
ENUMS
ConsumerControlButton 彈性
類型:uint32
在 fuchsia.input.report/consumer_control.fidl 中定義
這些 ControlButton 代表用於變更主機設定的「開啟/關閉」按鈕。
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| VOLUME_UP | 1 | 這個按鈕代表音量增加。 | 
| VOLUME_DOWN | 2 | 這個按鈕可表示音量降低。 | 
| 暫停 | 3 | 這個按鈕代表暫停。 | 
| FACTORY_RESET | 4 | 這個按鈕可表示主機恢復原廠設定。 | 
| MIC_MUTE | 5 | 這個按鈕代表正在將主機的麥克風設為靜音。 | 
| 重新啟動 | 6 | 這個按鈕表示正在重新啟動主機。 | 
| CAMERA_DISABLE | 7 | 這個按鈕代表停用主機上的攝影機。 | 
| FUNCTION | 8 | 這個按鈕代表函式。 新增時間:HEAD | 
| 電源 | 9 | 這個按鈕代表電源鍵。 新增時間:HEAD | 
DeviceType 彈性
類型:uint32
在 fuchsia.input.report/device.fidl 中定義
要由 InputDevice.GetInputReport 填入的 InputReport 欄位。
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| MOUSE | 0 | |
| 感測器 | 1 | |
| TOUCH | 2 | |
| 鍵盤 | 3 | |
| CONSUMER_CONTROL | 4 | 
LedType 彈性
類型:uint32
在 fuchsia.input.report/led.fidl 中定義
LedType 代表裝置上可開啟或關閉的 LED 燈。如果適用,每個 LED 的定義都衍生自下列其中一個來源,但具備 Fuchsia 專用數值:
- 使用頁面 0x0008 (LED) 的 USB HID 使用碼
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| NUM_LOCK | 1 | LED 表示鍵盤的數字鎖定功能已啟用。 對應於 USB HID 頁面 0x0008 用量 0x0001 | 
| CAPS_LOCK | 2 | LED 指示燈表示鍵盤已啟用大寫鎖定功能。 對應於 USB HID 頁面 0x0008 用量 0x0002 | 
| SCROLL_LOCK | 3 | LED 表示鍵盤的捲動鎖定功能已啟用。 對應於 USB HID 頁面 0x0008 用量 0x0003 | 
| 撰寫 | 4 | LED 指示燈,表示鍵盤已啟用組合模式。對應於 USB HID 頁面 0x0008 用量 0x0004 | 
| 肯納 | 5 | LED 指示燈,表示鍵盤的假名模式已啟用。 對應於 USB HID 頁面 0x0008 用量 0x0005 | 
SensorReportingState 彈性
類型:uint32
在 fuchsia.input.report/sensor.fidl 中定義
SensorReportingState 會決定感應器傳送報告的時間。
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| REPORT_NO_EVENTS | 1 | 不會傳送任何事件。 | 
| REPORT_ALL_EVENTS | 2 | 所有事件都將從感應器傳送。大部分的感應器都可以透過  | 
| REPORT_THRESHOLD_EVENTS | 3 | 系統只會記錄超過門檻的事件。 | 
SensorType 彈性
類型:uint32
在 fuchsia.input.report/sensor.fidl 中定義
每個感應器值都有對應的 SensorType,用於說明要在世界測量的值。
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| ACCELEROMETER_X | 1 | X 軸加速。 | 
| ACCELEROMETER_Y | 2 | Y 軸加速。 | 
| ACCELEROMETER_Z | 3 | Z 軸加速。 | 
| MAGNETOMETER_X | 4 | X 軸的磁場強度。 | 
| MAGNETOMETER_Y | 5 | Y 軸的磁場強度。 | 
| MAGNETOMETER_Z | 6 | Z 軸的磁場強度。 | 
| GYROSCOPE_X | 7 | X 方向逆時針移動的角度。 | 
| GYROSCOPE_Y | 8 | Y 方向逆時針移動的角度。 | 
| GYROSCOPE_Z | 9 | Z 方向逆時針移動的角度。 | 
| LIGHT_ILLUMINANCE | 10 | 環境光線。 | 
| LIGHT_RED | 11 | 紅燈的環境光度。 | 
| LIGHT_GREEN | 12 | 環境綠光的環境光度。 | 
| LIGHT_BLUE | 13 | 藍光的環境光度。 | 
TouchConfigurationInputMode 彈性
類型:uint32
在 fuchsia.input.report/touch.fidl 中定義
輸入模式,指出應在輸入報表中使用哪個頂層集合。這些值必須對應至通用序列匯流排 (USB) 規格 (https://usb.org/sites/default/files/hut1_22.pdf) 中 HID 使用表 16.7 中定義的輸入模式。
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| MOUSE_COLLECTION | 0 | 使用滑鼠收集功能取得報表資料。 | 
| WINDOWS_PRECISION_TOUCHPAD_COLLECTION | 3 | 使用 Windows 精確度觸控板收集報告資料。由 Windows Precision 觸控板所需 HID 頂層集合定義:https://docs.microsoft.com/ | 
TouchType 彈性
類型:uint32
在 fuchsia.input.report/touch.fidl 中定義
觸控來源的裝置類型。
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| 觸控螢幕 | 1 | 觸控螢幕包含與螢幕相關聯的直接手指輸入操作。 | 
| 觸控板 | 2 | 觸控板是一種指標裝置,可追蹤手指位置。 | 
UnitType 彈性
類型:uint32
在 fuchsia.input.report/units.fidl 中定義
如此一來,即可以簡單的標準化方式指定單位。您可以視需要增加新的單位。每個 UnitType 都應該以特定單位命名,而該單位應使用名稱完全區分 (例如:使用 METERS,而不是 DISTANCE)。需要區別的較為複雜的單位應以 SI_ (適用於國際單位) 或 ENGLISH_ (英文單位) 開頭。
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| 無 | 0 | 裝置未指定單位。 | 
| OTHER | 1 | 裝置指定的單位無法換算為任何其他單位。 | 
| METERS | 2 | 距離測量單位 (單位為公尺)。 | 
| 圖表 | 3 | 質量測量值,以公克為單位。 | 
| 定義 | 4 | 旋轉角度。 | 
| ENGLISH_ANGULAR_VELOCITY | 5 | 測量角度速度,以每秒度為單位。 | 
| SI_LINEAR_VELOCITY | 6 | 線性速度的測量單位,以公尺/秒為單位。 | 
| SI_LINEAR_ACCELERATION | 7 | 加速測量單位,以公尺/秒為單位。 | 
| 網路攝影機 | 8 | 測量 Weber 的磁通量。 | 
| 加拿大 | 9 | 測量卡德拉的發光強度。 | 
| 通行 | 10 | 用來測量平等的壓力。 | 
| 大型使用者體驗 | 11 | |
| 秒 | 12 | 
VendorGoogleProductId 彈性
類型:uint32
在 fuchsia.input.report/device_ids.fidl 中定義的
以下為 ProductId,代表這個輸入裝置代表的產品。如果輸入裝置是 HID 裝置,ProductId 會直接對應至 HID ProductId。如果輸入裝置不是 HID 裝置,ProductId 將大於 0xFFFF,也就是 HID ProductId 的最大值。
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| FOCALTECH_TOUCHSCREEN | 65537 | 以下是非 HID 的供應商 ID | 
| AMS_LIGHT_SENSOR | 65538 | |
| PC_PS2_KEYBOARD | 65539 | |
| PC_PS2_MOUSE | 65540 | |
| ADC_BUTTONS | 65541 | 新增時間:HEAD | 
| GOODIX_TOUCHSCREEN | 65542 | 新增時間:HEAD | 
| HID_BUTTONS | 65543 | 新增時間:HEAD | 
| VIRTIO_MOUSE | 65544 | 新增時間:HEAD | 
| VIRTIO_KEYBOARD | 65545 | 新增時間:HEAD | 
| VIRTIO_TOUCHSCREEN | 65546 | 新增時間:HEAD | 
| GOLDFISH_ACCELERATION_SENSOR | 2417819649 | |
| GOLDFISH_GYROSCOPE_SENSOR | 2417819650 | |
| GOLDFISH_RGBC_LIGHT_SENSOR | 2417819651 | 
VendorId 彈性
類型:uint32
在 fuchsia.input.report/device_ids.fidl 中定義的
VendorId 代表建立這個輸入裝置的供應商。如果輸入裝置是 HID 裝置,VendorId 會直接對應至 HIDVendorId。如果輸入裝置不是 HID 裝置,VendorId 會大於 0xFFFF,也就是 HID VendorId 上限。
| 名稱 | 物超所值 | 說明 | 
|---|---|---|
| Google 體驗 | 6353 | 以下是 HID VendorIds,範圍為 0x0000 - 0xFFFF。 | 
資料表
ConsumerControlDescriptor
在 fuchsia.input.report/consumer_control.fidl 中定義
Fuchsia ConsumerControl 代表是用來變更主機值的裝置。一般控制項包括音量、電源、媒體播放等等。(一般會將電視遙控器視為一般的 Consumer Control)。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | input | ConsumerControlInputDescriptor | 
ConsumerControlInputDescriptor
在 fuchsia.input.report/consumer_control.fidl 中定義
說明從 ConsumerControl 裝置傳送到主機的輸入報告格式。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | buttons | vector<ConsumerControlButton>[255] | 此裝置包含的按鈕清單。 | 
ConsumerControlInputReport
在 fuchsia.input.report/consumer_control.fidl 中定義
ConsumerControl 裝置製作的單一報告。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | pressed_buttons | vector<ConsumerControlButton>[255] | 目前按下的按鈕清單。 | 
ContactInputDescriptor
在 fuchsia.input.report/touch.fidl 中定義
ContactInputDescriptor 說明與觸控裝置的關聯欄位。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | position_x | Axis | 說明 X 軸的報告。 | 
| 2 | position_y | Axis | 說明 Y 軸的報告。 | 
| 3 | pressure | Axis | 接觸器壓力。 | 
| 4 | contact_width | Axis | 接觸區域的寬度。 | 
| 5 | contact_height | Axis | 接觸區域的高度。 | 
ContactInputReport
在 fuchsia.input.report/touch.fidl 中定義
ContactInputReport 描述一次觸控裝置上的動作。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | contact_id | uint32 | 這位聯絡人的 ID。 | 
| 2 | position_x | int64 | 聯絡人在 X 軸上的位置。 | 
| 3 | position_y | int64 | 聯絡人在 Y 軸的位置。 | 
| 4 | pressure | int64 | 接觸器壓力。 | 
| 5 | contact_width | int64 | 觸控聯絡人周圍的定界框寬度。與  | 
| 6 | contact_height | int64 | 觸控聯絡人周圍的定界框高度。與  | 
| 7 | confidence | bool | 也稱為觸控有效。表示裝置的觸控聯絡人確實是理想的有效聯絡人。如果聯絡人無效,裝置應回報 0。如果聯絡人的身分正確且有效 (例如手指觸碰),裝置應回報 1 新增:9 | 
DeviceDescriptor
在 fuchsia.input.report/concept.fidl 中定義
DeviceDescriptor 說明實體輸入裝置。部分實體裝置可能會傳送多種類型的報表 (例如實體觸控螢幕可傳送觸控和觸控筆報告,因此同時具有 TouchDescriptor 和 StylusDescriptor)。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | device_info | DeviceInfo | 這個欄位已移除。請改用 device_information。 移除時間:20 | 
| 2 | mouse | MouseDescriptor | 出現  | 
| 3 | sensor | SensorDescriptor | 如果  | 
| 4 | touch | TouchDescriptor | 如果  | 
| 5 | keyboard | KeyboardDescriptor | 當  | 
| 6 | consumer_control | ConsumerControlDescriptor | 當  | 
| 7 | device_information | DeviceInformation | 應一律顯示  新增:20 | 
DeviceInformation
在 fuchsia.input.report/concept.fidl 中定義
DeviceInformation 會提供裝置的更多相關資訊,並可讓用戶端區分裝置 (例如兩個來自不同廠商的觸控螢幕)。如果裝置是 HID 裝置,則 ID 資訊會由裝置本身提供。其他非 HID 裝置可能會在驅動程式庫中指派 ID,因此指派適當的 ID 將由駕駛人負責。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | vendor_id | uint32 | |
| 2 | product_id | uint32 | |
| 3 | version | uint32 | |
| 4 | polling_rate | zx/Duration | 
FeatureReport
在 fuchsia.input.report/report.fidl 中定義
包含輸入裝置功能資訊的單一報表。從裝置取得的功能報表會顯示裝置目前的狀態。傳送功能報告至裝置時,裝置會設為該狀態。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | sensor | SensorFeatureReport | |
| 2 | touch | TouchFeatureReport | 
InputReport
在 fuchsia.input.report/report.fidl 中定義
InputReport 是由輸入裝置建立的一份報表。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | event_time | zx/Time | 
 | 
| 2 | mouse | MouseInputReport | 如果裝置含有滑鼠,則會產生  | 
| 3 | trace_id | uint64 | 用來連結追蹤記錄開始/結束事件的專屬 ID。 | 
| 4 | sensor | SensorInputReport | 如果裝置含有感應器,系統會產生  | 
| 5 | touch | TouchInputReport | 如果裝置含有觸控式裝置,則會產生  | 
| 6 | keyboard | KeyboardInputReport | 如果裝置含有鍵盤,則系統會產生  | 
| 7 | consumer_control | ConsumerControlInputReport | 如果裝置含有 ConsumerControl 裝置,則系統會產生  | 
| 8 | report_id | uint8 | 描述此 InputReport 的描述元將有相符的 ReportID。如果沒有,則 report_id 為 0。 | 
KeyboardDescriptor
在 fuchsia.input.report/keyboard.fidl 中定義
鍵盤裝置的功能。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | input | KeyboardInputDescriptor | |
| 2 | output | KeyboardOutputDescriptor | 
KeyboardInputDescriptor
在 fuchsia.input.report/keyboard.fidl 中定義
說明從鍵盤傳送至裝置的輸入報表格式。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 2 | keys3 | vector<fuchsia.input/Key>[256] | 這個鍵盤包含的按鍵清單。 | 
KeyboardInputReport
在 fuchsia.input.report/keyboard.fidl 中定義
透過鍵盤裝置建立的單份報表。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 2 | pressed_keys3 | vector<fuchsia.input/Key>[256] | 目前按下的按鍵清單。 | 
KeyboardOutputDescriptor
在 fuchsia.input.report/keyboard.fidl 中定義
說明可傳送到鍵盤的輸出報表格式。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | leds | vector<LedType>[256] | 可切換的鍵盤 LED 燈清單。 | 
KeyboardOutputReport
在 fuchsia.input.report/keyboard.fidl 中定義
包含鍵盤輸出資訊的單一報表。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | enabled_leds | vector<LedType>[256] | 這份清單中的每個 LED 燈都會開啟。系統會關閉不在這份清單中的所有 LED 燈。 | 
MouseDescriptor
在 fuchsia.input.report/mouse.fidl 中定義
滑鼠裝置的功能。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | input | MouseInputDescriptor | 
MouseInputDescriptor
在 fuchsia.input.report/mouse.fidl 中定義
說明從滑鼠傳送至裝置的輸入報表的格式。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | movement_x | Axis | 相對 X 運動的範圍。 | 
| 2 | movement_y | Axis | 相對 Y 移動的範圍。 | 
| 3 | scroll_v | Axis | 相對垂直捲動的範圍。 | 
| 4 | scroll_h | Axis | 相對水平捲動的範圍。 | 
| 5 | buttons | vector<uint8>[32] | 這是滑鼠按鈕的 ID 向量。 | 
| 6 | position_x | Axis | X 位置的範圍。 這裡的主要用途是透過虛擬滑鼠,例如 VNC。 | 
| 7 | position_y | Axis | Y 位置的範圍。 這裡的主要用途是透過虛擬滑鼠,例如 VNC。 | 
MouseInputReport
在 fuchsia.input.report/mouse.fidl 中定義
MouseReport 會提供滑鼠和目前按下按鈕的相對移動元素。「相對」是指上一份報表與這份報告之間的移動用戶端會負責追蹤這個情況,並將其轉換為絕對移動情形。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | movement_x | int64 | 相對 X 位置位移。 | 
| 2 | movement_y | int64 | 相對 Y 位置位移。 | 
| 3 | scroll_v | int64 | 垂直垂直捲動位移。 | 
| 4 | scroll_h | int64 | 相對水平捲動位移。 | 
| 5 | pressed_buttons | vector<uint8>[32] | 目前按下的按鈕清單。 | 
| 6 | position_x | int64 | X 的位置。 這裡的主要用途是透過虛擬滑鼠,例如 VNC。 | 
| 7 | position_y | int64 | Y 的位置。 這裡的主要用途是透過虛擬滑鼠,例如 VNC。 | 
OutputDescriptor
在 fuchsia.input.report/concept.fidl 中定義
說明實體輸入裝置可接受的輸出報告。輸出資訊通常會向使用者顯示裝置輸出內容 (例如 LED、觸覺回饋等)。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | keyboard | KeyboardOutputDescriptor | 
OutputReport
在 fuchsia.input.report/report.fidl 中定義
其中包含輸入裝置的輸出資訊的單一報表。輸出資訊通常會向使用者顯示裝置輸出內容 (例如 LED、觸覺回饋等)。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | keyboard | KeyboardOutputReport | 
SelectiveReportingFeatureReport
在 fuchsia.input.report/touch.fidl 中定義
選擇性報表功能報表,指出所回報的輸入類型。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | surface_switch | bool | 如果設為 true,裝置就會回報聯絡人。 | 
| 2 | button_switch | bool | 若為 true,裝置會回報按鈕狀態。 | 
SensorDescriptor
在 fuchsia.input.report/sensor.fidl 中定義
感應器裝置的功能。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | input | vector<SensorInputDescriptor>[255] | |
| 2 | feature | vector<SensorFeatureDescriptor>[255] | 
SensorFeatureDescriptor
在 fuchsia.input.report/sensor.fidl 中定義
說明感應器功能報告的格式。像是透過感應器要求或傳送至感應器。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | report_interval | Axis | 說明這個感應器支援的最短和最長報表間隔。 | 
| 2 | sensitivity | vector<SensorAxis>[100] | 設定指定  | 
| 3 | supports_reporting_state | bool | 如果這個值為 true,則 SensorFeatureReport 可支援設定 SensorReportingState。 | 
| 4 | threshold_high | vector<SensorAxis>[100] | 設定指定  | 
| 5 | threshold_low | vector<SensorAxis>[100] | 設定指定  | 
| 6 | sampling_rate | Axis | 說明這個感應器支援的最小和最大取樣率。 | 
| 7 | report_id | uint8 | 目前描述元的 ReportID。如果報表 ID 相同,則應與這個描述元建立關聯。 | 
SensorFeatureReport
在 fuchsia.input.report/sensor.fidl 中定義
SensorFeatureReport 可描述特定感應器的功能。如果將 FeatureReport 傳送至「Input Device」,系統就會進行裝置設定。如果向輸入裝置要求 FeatureReport,系統會顯示裝置目前的設定。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | report_interval | int64 | 感應器傳送報表的間隔時間。 | 
| 2 | sensitivity | vector<int64>[100] | 各種  | 
| 3 | reporting_state | SensorReportingState | 這會決定感應器傳送報告的時間。 | 
| 4 | threshold_high | vector<int64>[100] | 各種 | 
| 5 | threshold_low | vector<int64>[100] | 各種 | 
| 6 | sampling_rate | int64 | 感應器的取樣速率。 | 
SensorInputDescriptor
在 fuchsia.input.report/sensor.fidl 中定義
說明從感應器傳送至裝置的輸入報告格式。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | values | vector<SensorAxis>[100] | 
 | 
| 2 | report_id | uint8 | 目前描述元的 ReportID。如果報表 ID 相同,則應與這個描述元建立關聯。 | 
SensorInputReport
在 fuchsia.input.report/sensor.fidl 中定義
SensorReport 會提供感應器在指定時間點測量的值。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | values | vector<int64>[100] | 
 | 
TouchDescriptor
在 fuchsia.input.report/touch.fidl 中定義
觸控裝置的功能。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | input | TouchInputDescriptor | |
| 2 | feature | TouchFeatureDescriptor | 
TouchFeatureDescriptor
在 fuchsia.input.report/touch.fidl 中定義
說明觸控板設定的功能報告格式。您可以透過觸控板要求功能報告,或將報告傳送至觸控板。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | supports_input_mode | bool | 指出觸控功能描述元是否支援不同的輸入模式。 | 
| 2 | supports_selective_reporting | bool | 指出觸控功能描述元是否支援選擇性回報功能。 | 
TouchFeatureReport
在 fuchsia.input.report/touch.fidl 中定義
TouchFeatureReport 可說明特定觸控裝置的功能。如果將 FeatureReport 傳送至「Input Device」,系統就會進行裝置設定。如果向輸入裝置要求 FeatureReport,系統會顯示裝置目前的設定。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | input_mode | TouchConfigurationInputMode | 輸入模式目前正在回報資料。 | 
| 2 | selective_reporting | SelectiveReportingFeatureReport | 目前回報的報表類型。 | 
TouchInputDescriptor
在 fuchsia.input.report/touch.fidl 中定義
說明從鍵盤傳送至裝置的輸入報表格式。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | contacts | vector<ContactInputDescriptor>[10] | 與這個觸控描述元相關聯的聯絡人描述元。 | 
| 2 | max_contacts | uint32 | 這部觸控裝置一次可回報的聯絡人數量上限。 | 
| 3 | touch_type | TouchType | 使用的觸控裝置類型。 | 
| 4 | buttons | vector<uint8>[10] | 觸控裝置上實體按鈕的 ID。 | 
TouchInputReport
在 fuchsia.input.report/touch.fidl 中定義
TouchInputReport 會指出觸控螢幕目前記錄的聯絡人。
| 序數 | 廣闊 | 類型 | 說明 | 
|---|---|---|---|
| 1 | contacts | vector<ContactInputReport>[10] | 裝置目前回報的聯絡人。 | 
| 2 | pressed_buttons | vector<uint8>[10] | 目前所按下按鈕的 ID。 | 
聯合國
InputDevice_GetFeatureReport_Result 嚴格
在 fuchsia.input.report/device.fidl 中定義
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | InputDevice_GetFeatureReport_Response | |
| 2 | err | zx/Status | 
InputDevice_GetInputReport_Result 嚴格
在 fuchsia.input.report/device.fidl 中定義
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | InputDevice_GetInputReport_Response | |
| 2 | err | zx/Status | 
InputDevice_SendOutputReport_Result 嚴格
在 fuchsia.input.report/device.fidl 中定義
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | InputDevice_SendOutputReport_Response | |
| 2 | err | zx/Status | 
InputDevice_SetFeatureReport_Result 嚴格
在 fuchsia.input.report/device.fidl 中定義
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | InputDevice_SetFeatureReport_Response | |
| 2 | err | zx/Status | 
InputReportingReader_ReadInputReporting_Result 嚴格
在 fuchsia.input.report/device.fidl 中定義
| 序數 | Variant | 類型 | 說明 | 
|---|---|---|---|
| 1 | response | InputReportsReader_ReadInputReports_Response | |
| 2 | err | zx/Status | 
觀測站
| 名稱 | 物超所值 | 類型 | 說明 | 
|---|---|---|---|
| CONSUMER_CONTROL_MAX_NUM_BUTTONS | 255 | uint32 | ConsumerControl 向量的硬式編碼大小上限。如果裝置上有太多物件可顯示,這些大小就應該增加。 | 
| KEYBOARD_MAX_NUM_KEYS | 256 | uint32 | 鍵盤向量的硬式編碼大小上限。如果鍵盤出現物件數量超出容許上限,則應提高這些大小。 | 
| KEYBOARD_MAX_NUM_LEDS | 256 | uint32 | |
| KEYBOARD_MAX_PRESSED_KEYS | 256 | uint32 | |
| MAX_DEVICE_REPORT_COUNT | 50 | uint32 | |
| MAX_REPORT_COUNT | 255 | uint32 | 以硬式編碼的方式設定報表數量上限。由於報表 ID 只有 8 位元,因此一次只能使用 255 個不同的報表。 | 
| MOUSE_MAX_NUM_BUTTONS | 32 | uint32 | 硬式編碼滑鼠按鈕上限。如果我們日後看到滑鼠,就會有更多按鈕 | 
| SENSOR_MAX_VALUES | 100 | uint32 | 感應器最大值的硬式編碼數量。如果我們日後看到感應器具有更多數值,應該就會提高這一點。 | 
| TOUCH_MAX_CONTACTS | 10 | uint32 | 每份報表以硬式編碼設定的聯絡人數量上限。如果我們發現裝置數量超過上限,這個值應該就會提高。 | 
| TOUCH_MAX_NUM_BUTTONS | 10 | uint32 |