Skip to content

Add relative mouse movement (move by delta)#330

Merged
JE-Chen merged 1 commit into
devfrom
feat/mouse-relative-batch
Jun 22, 2026
Merged

Add relative mouse movement (move by delta)#330
JE-Chen merged 1 commit into
devfrom
feat/mouse-relative-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary

Round-11, automation-core. The mouse wrapper exposed only absolute set_mouse_position — no moveRel(dx, dy) (pynput/PyAutoGUI staple) for relative-pointer / canvas / FPS apps and incremental drags.

Layers

  • Headless core: je_auto_control/utils/mouse_relative/mouse_relative.pyrelative_target (pure current+delta arithmetic), move_mouse_relative (reads live position, moves by delta; injectable getter/setter; raises AutoControlMouseException if position unreadable). No PySide6.
  • Facade: both re-exported + __all__.
  • Executor: AC_move_mouse_relative.
  • MCP: ac_move_mouse_relative (SIDE_EFFECT_ONLY).
  • Script Builder: one CommandSpec under Mouse.

Tests / docs

  • test/unit_test/headless/test_mouse_relative_batch.py — 6 headless tests (arithmetic, current+delta via injected get/set, unreadable-position raises + wiring + facade). No real pointer.
  • EN/Zh feature docs v120_features_doc.rst + toctrees; 3 WHATS_NEW entries.

Note: horizontal mouse-wheel scroll is intentionally deferred — it needs cross-platform backend HWHEEL support that isn't headless-testable. Codacy may show action_required from its coverage gate only (issues=0).

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit e826894 into dev Jun 22, 2026
15 of 16 checks passed
@JE-Chen JE-Chen deleted the feat/mouse-relative-batch branch June 22, 2026 17:17
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant