poco.drivers.std.inputs module

class StdInput(client)[source]

Bases: poco.sdk.interfaces.input.InputInterface

click(**kwargs)[source]

Perform click action as simulated input on target device. Coordinates arguments are all in range of 0~1.

Parameters:
  • y (float) – y-coordinate
  • x (float) – x-coordinate
keyevent(**kwargs)[source]

Send a key event to target device.

Parameters:keycode (int or char) – Ascii key code
longClick(**kwargs)[source]

Perform press action as simulated input on target device within given seconds. Coordinates arguments are all in range of 0~1.

Parameters:
  • x (float) – x-coordinate
  • y (float) – y-coordinate
  • duration (float) – time interval to perform the action
swipe(**kwargs)[source]

Perform swipe action as simulated input on target device from point A to B within given time interval to perform the action. Coordinates arguments are all in range of 0~1.

Parameters:
  • x1 (float) – x-coordinate of the start point
  • y1 (float) – y-coordinate of the start point
  • x2 (float) – x-coordinate of the end point
  • y2 (float) – y-coordinate of the end point
  • duration (float) – time interval to perform the swipe action