pub fn hid_usage_to_input3_key(usage_id: u16) -> Option<Key>
Expand description
Converts a USB HID Usage ID to the corresponding input3 [Key
].
The Usage ID is interpreted in the context of Usage Page 0x07 (“Keyboard/Keypad”), except that:
- 0xe8 is interpreted as Usage Page 0x0c, Usage ID 0xe9 (Volume Increment)
- 0xe9 is interpreted as Usage Page 0x0c, Usage ID 0xea (Volume Decrement)
These exceptions provide backwards compatibility with Root Presenter’s input pipeline.
§Parameters
usage_id
: The Usage ID to convert to its input3 [Key
] equivalent.
§Future directions
Per https://fxbug.dev/42142534, this method will be replaced with a method that deals in
fuchsia.input.Key
s, instead of HID Usage IDs.