Google celebrates Hispanic Heritage Month. See how.

fuchsia.ui.test.input

Added: 9

PROTOCOLS

Keyboard

Defined in fuchsia.ui.test.input/text.fidl

A tool to inject keyboard events into Input Pipeline.

Please extend as necessary.

SimulateUsAsciiTextEntry

Simulates input of the set of keystrokes required to type text, as if on a US QWERTY keyboard.

US ASCII text get mapped to the corresponding key presses. For example a gets mapped into a press and a followup release of the key a on the US QWERTY keyboard. Also, A gets mapped into a press of the Shift key, followed by a press and release of a.

For convenience, the \n and \t get converted into Enter and Tab keys respectively.

Request

NameType
payload KeyboardSimulateUsAsciiTextEntryRequest

Response

<EMPTY>

KeyboardInputListener

Defined in fuchsia.ui.test.input/text.fidl

A tool for client applications to report text input to interested parties (e.g. a test fixture).

NOTE: The reporter is the client of this service.

Canonical usage is for a test to inject text via fuchsia.ui.test.input.Keyboad, and wait for the client under test to report back that it received the injected text via fuchsia.ui.test.input.KeyboardInputListener.

ReportTextInput

Notify the listener of the text string generated by the set of key events received by the application.

Request

NameType
payload KeyboardInputListenerReportTextInputRequest

MediaButtonsDevice

Defined in fuchsia.ui.test.input/media_buttons.fidl

A tool to inject media button events into Input Pipeline.

Please extend as necessary.

SimulateButtonPress

Simulates a button press and release on the requested button on the device.

Request

NameType
payload MediaButtonsDeviceSimulateButtonPressRequest

Response

<EMPTY>

Mouse

Defined in fuchsia.ui.test.input/mouse.fidl

A tool to inject mouse events into Input Pipeline.

Please extend as necessary.

SimulateMouseEvent

Injects an input report corresponding to the event specified.

NOTE: the movement parameters have a range of [-1000, 1000], and the scroll parameters have a range of [-100, 100].

Request

NameType
payload MouseSimulateMouseEventRequest

Response

<EMPTY>

MouseInputListener

Defined in fuchsia.ui.test.input/mouse.fidl

A tool for applications to report touch input to interested parties (e.g. a test fixture).

ReportMouseInput

Report that component under test has received expected input.

Request

NameType
payload MouseInputListenerReportMouseInputRequest

Registry

Defined in fuchsia.ui.test.input/registry.fidl

*** This protocol must not be used in production. ***

Enables clients to register fake input devices, which can be used to inject input events directly into Input Pipeline.

RegisterKeyboard

Enables the client to inject keyboard events using the corresponding client end to device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.Keyboard channel will remain open even if the Registry connection closes.

Request

NameType
payload RegistryRegisterKeyboardRequest

Response

<EMPTY>

RegisterMediaButtonsDevice

Enables the client to inject media buttons events using the corresponding client end to device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.MediaButtonsDevice channel will remain open even if the Registry connection closes.

Request

NameType
payload RegistryRegisterMediaButtonsDeviceRequest

Response

<EMPTY>

RegisterMouse

Enables the client to inject mouse events using the corresponding client end to device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.Mouse channel will remain open even if the Registry connection closes.

Request

NameType
payload RegistryRegisterMouseRequest

Response

<EMPTY>

RegisterTouchScreen

Enables the client to inject touch events using the corresponding client end to device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.TouchScreen channel will remain open even if the Registry connection closes.

Request

NameType
payload RegistryRegisterTouchScreenRequest

Response

<EMPTY>

TouchInputListener

Defined in fuchsia.ui.test.input/touch.fidl

A tool for applications to report touch input to interested parties (e.g. a test fixture).

ReportTouchInput

Report that component under test has received expected input.

Request

NameType
payload TouchInputListenerReportTouchInputRequest

TouchScreen

Defined in fuchsia.ui.test.input/touch.fidl

A tool to inject touch events into Input Pipeline.

NOTE: The fake touch screen's logical coordinate space spans [-1000, 1000] on both the x and y axes.

Please extend as necessary.

SimulateSwipe

Simulates a swipe that starts at start_location and ends at end_location, with a total number of move events equal to move_event_count.

The generated pointer event stream will be:

DOWN + CHANGE_1 + ... + CHANGE_n + UP, where n == move_event_count

Events are injected with no explicit delay in between; in other words, the observed delay between successive events will be approximately equal to the time required to inject a single event.

Request

NameType
payload TouchScreenSimulateSwipeRequest

Response

<EMPTY>

SimulateTap

Simulates a tap at the requested location.

Request

NameType
payload TouchScreenSimulateTapRequest

Response

<EMPTY>

ENUMS

MouseButton flexible

Type: uint32

Defined in fuchsia.ui.test.input/mouse.fidl

Identifies various buttons on a standard mouse.

NameValueDescription
0

"Left" mouse button.

1

"Right" mouse button.

2

"Third" mouse button.

MouseEventPhase flexible

Type: uint32

Defined in fuchsia.ui.test.input/mouse.fidl

Identifies the phase of a mouse event.

NameValueDescription
0

The observer has started tracking the mouse.

1

The mouse has moved since the last ADD event, without an interceding DOWN event.

2

One or more mouse buttons have been pressed.

3

The mouse has moved since the last DOWN event.

4

All pressed buttons have been released.

5

The mouse wheel was manipulated.

TABLES

KeyboardInputListenerReportTextInputRequest

Defined in fuchsia.ui.test.input/text.fidl

OrdinalFieldTypeDescription
text string[1024]

The content of the text input received by the reporter.

KeyboardSimulateUsAsciiTextEntryRequest

Defined in fuchsia.ui.test.input/text.fidl

OrdinalFieldTypeDescription
text string[1024]

MediaButtonsDeviceSimulateButtonPressRequest

Defined in fuchsia.ui.test.input/media_buttons.fidl

OrdinalFieldTypeDescription
button fuchsia.input.report/ConsumerControlButton

The button receiving the button press.

MouseInputListenerReportMouseInputRequest

Defined in fuchsia.ui.test.input/mouse.fidl

OrdinalFieldTypeDescription
local_x float64

The horizontal coordinate in the reporter's coordinate system.

local_y float64

The vertical coordinate in the reporter's coordinate system.

time_received zx/time

The monotonic time (ns) the mouse event was received by the client. Note that this value should be used with caution. Some reporters may not be capable of ns-level precision, but still report in ns-level units.

component_name string[1024]

Name of the component to help distinguish responses from multiple components.

NOTE: This name is independent of component framework, so the reporter and listener are free to agree on an arbitrary value.

buttons vector<MouseButton>[32]

The pressed buttons that the reporter received.

phase MouseEventPhase

The phase of the mouse event that the reporter received.

device_pixel_ratio float64

The device pixel ratio of which the reporter is aware.

Some reporters may account for this scale factor when converting to local coordinates.

wheel_x_physical_pixel float64

The horizontal wheel scroll delta in physical pixels.

wheel_y_physical_pixel float64

The vertical wheel scroll delta in physical pixels.

MouseSimulateMouseEventRequest

Defined in fuchsia.ui.test.input/mouse.fidl

OrdinalFieldTypeDescription
pressed_buttons vector<MouseButton>[32]

Set of buttons that are currently pressed. Must NOT contain duplicates.

movement_x int64

Relative X positional displacement.

movement_y int64

Relative Y positional displacement.

scroll_v_detent int64

Relative vertical scrolling displacement by detent.

scroll_h_detent int64

Relative horizontal scrolling displacement by detent.

scroll_v_physical_pixel float64

Recommended vertical scrolling displacement by physical pixel, it is computed with accelerator, detent / mm to pixel ratio, etc.

scroll_h_physical_pixel float64

Recommended horizontal scrolling displacement by physical pixel, it is computed with accelerator, detent / mm to pixel ratio, etc.

RegistryRegisterKeyboardRequest resource

Defined in fuchsia.ui.test.input/registry.fidl

OrdinalFieldTypeDescription
device server_end<Keyboard>

RegistryRegisterMediaButtonsDeviceRequest resource

Defined in fuchsia.ui.test.input/registry.fidl

OrdinalFieldTypeDescription
device server_end<MediaButtonsDevice>

RegistryRegisterMouseRequest resource

Defined in fuchsia.ui.test.input/registry.fidl

OrdinalFieldTypeDescription
device server_end<Mouse>

RegistryRegisterTouchScreenRequest resource

Defined in fuchsia.ui.test.input/registry.fidl

OrdinalFieldTypeDescription
device server_end<TouchScreen>

TouchInputListenerReportTouchInputRequest

Defined in fuchsia.ui.test.input/touch.fidl

OrdinalFieldTypeDescription
local_x float64

The horizontal coordinate, in the reporter's coordinate system.

local_y float64

The vertical coordinate, in the reporter's coordinate system.

time_received zx/time

The monotonic time (ns) the pointer data was received by the reporter. Note that this value should be used with caution. Some reporters may not be capable of ns-level precision, but still report in ns-level units.

device_pixel_ratio float64

The number of physical pixels, per logical pixel, as reported by the reporter.

component_name string[1024]

Name of the component to help distinguish responses from multiple components.

NOTE: This name is independent of component framework, so the reporter and listener are free to agree on an arbitrary value.

TouchScreenSimulateSwipeRequest

Defined in fuchsia.ui.test.input/touch.fidl

OrdinalFieldTypeDescription
start_location fuchsia.math/Vec

Starting location of the swipe, in the input device's logical coordinate space.

end_location fuchsia.math/Vec

End location of the swipe, in the input device's logical coordinate space.

move_event_count uint32

Number of move events in the swipe.

TouchScreenSimulateTapRequest

Defined in fuchsia.ui.test.input/touch.fidl

OrdinalFieldTypeDescription
tap_location fuchsia.math/Vec

Location of the tap event, in the input device's logical coordinate space.

CONSTANTS

NameValueTypeDescription
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.