testudos.api.input
testudos.api.input
Synthetic mouse and drag helpers (engine RPC).
Coordinates are item-local when provided; omit x and y to use the item center
(sentinel -1 on the wire). Matches QML semantics used by simulateClick.
click_button
def click_button(target: Any) -> NoneInvoke click() when available, otherwise synthetic click at center.
mouse_click
def mouse_click(target: Any, x: int | None = None, y: int | None = None) -> NoneLeft press and release on target.
Arguments:
target- Object name orQtObjectProxy. x, y: Optional local coordinates; both required if either is given.
double_click
def double_click(target: Any, x: int | None = None, y: int | None = None) -> NoneTwo consecutive left clicks at the same position.
mouse_press
def mouse_press(target: Any, x: int | None = None, y: int | None = None) -> NoneLeft button press only.
mouse_release
def mouse_release(target: Any, x: int | None = None, y: int | None = None) -> NoneLeft button release only.
mouse_move
def mouse_move(target: Any, x: int | None = None, y: int | None = None) -> NoneMove with no buttons (hover).
drag_and_drop
def drag_and_drop(source: Any, target: Any) -> NonePress at source center, drag to target center, release.
drag_and_drop_at
def drag_and_drop_at(source: Any, source_x: int, source_y: int, target: Any, target_x: int, target_y: int) -> NoneDrag using explicit local coordinates on source and target.
set_focus
def set_focus(target: Any) -> NoneSet keyboard focus on target (object name or QtObjectProxy).
key_press
def key_press(key: str) -> NonePress a key (does not release).
key_release
def key_release(key: str) -> NoneRelease a key.
key_click
def key_click(key: str) -> NonePress and release a key.
type_text
def type_text(target: Any, text: str) -> NoneType text into target (object must accept keyboard input).