From d4d0af8c5584a9eaf788cf4934261ce827185af8 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 5 Mar 2014 17:35:58 +0200 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BA=D1=83=D1=80=D1=81=D0=BE=D1=80=D0=B0=20=D0=BE?= =?UTF-8?q?=D1=82=20Android-=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socketfiletransfer/operations/CursorOperation.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/annimon/socketfiletransfer/operations/CursorOperation.java b/src/com/annimon/socketfiletransfer/operations/CursorOperation.java index 4818082..f391577 100644 --- a/src/com/annimon/socketfiletransfer/operations/CursorOperation.java +++ b/src/com/annimon/socketfiletransfer/operations/CursorOperation.java @@ -30,6 +30,8 @@ public class CursorOperation extends Operation { TYPE_RELEASED = 4, TYPE_KEY_RELEASED = 5, TYPE_MOVE_RELATIVE = 6, + TYPE_MOUSE_PRESSED = 7, + TYPE_MOUSE_RELEASED = 8, STOP = 10; private RobotUtils robot; @@ -97,6 +99,12 @@ public class CursorOperation extends Operation { int x = (int) (dis.readInt()); int y = (int) (dis.readInt()); robot.moveCursorRelative(x, y); + } else if (type == TYPE_MOUSE_PRESSED) { + int button = dis.readInt(); + robot.getRobot().mousePress(button); + } else if (type == TYPE_MOUSE_RELEASED) { + int button = dis.readInt(); + robot.getRobot().mouseRelease(button); } else if (type == TYPE_RELEASED) { robot.getRobot().mouseRelease(InputEvent.BUTTON1_MASK); }