From b2c0d0218bf144866cefd1573e8a9d33d5e3b13f Mon Sep 17 00:00:00 2001 From: hippoz Date: Thu, 28 Oct 2021 17:03:04 +0300 Subject: [PATCH] add basic click support --- capybara | 4 +- public/index.html | 122 +++++++++++++++++++++++++++++++++------------- 2 files changed, 92 insertions(+), 34 deletions(-) diff --git a/capybara b/capybara index 9000eda..eb90ea6 100755 --- a/capybara +++ b/capybara @@ -75,10 +75,12 @@ class InputController(): return False elif code == "r": self.mouse_controller.move(args["x"], args["y"]) - print(args["x"], args["y"]) + print("r", args["x"], args["y"]) elif code == "d": + print("d", args["button"]) self.mouse_controller.press(self.button_code_to_object(args["button"])) elif code == "u": + print("u", args["button"]) self.mouse_controller.release(self.button_code_to_object(args["button"])) else: print("got invalid code from parser (is this a bug with the MessageParser?)") diff --git a/public/index.html b/public/index.html index cf9cf63..a39da72 100644 --- a/public/index.html +++ b/public/index.html @@ -3,8 +3,7 @@ - - Document + Document @@ -135,9 +194,6 @@ -
- -
- +
\ No newline at end of file