compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

How to force pointer movement to a given x, y coordinates?

Open jeancsanchez opened this issue 2 years ago • 1 comments

jeancsanchez avatar Apr 20 '23 05:04 jeancsanchez

Could you elaborate please? What are you trying to achieve and on what platform?

Do you want to move the cursor with Compose for Desktop from code?

eymar avatar Apr 20 '23 10:04 eymar

@eymar Exactly. I want to move the mouse cursor with Compose for Desktop from the code. The Android module will send the coordinates to the Desktop application and move the cursor.

jeancsanchez avatar Apr 20 '23 18:04 jeancsanchez

@jeancsanchez This is outside of the scope of Compose, but you can try using the AWT Robot API: https://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html

m-sasha avatar Apr 20 '23 20:04 m-sasha