diff --git a/capybara b/capybara index eb90ea6..7eca512 100755 --- a/capybara +++ b/capybara @@ -51,6 +51,11 @@ class InputController(): "x": "int", "y": "int" }) + # Mouse relative scroll + self.parser.add_handler("s", { + "x": "int", + "y": "int" + }) # Mouse button down self.parser.add_handler("d", { "button": "int" @@ -82,6 +87,9 @@ class InputController(): elif code == "u": print("u", args["button"]) self.mouse_controller.release(self.button_code_to_object(args["button"])) + elif code == "s": + print("s", args["x"], args["y"]) + self.mouse_controller.scroll(args["x"], args["y"]) else: print("got invalid code from parser (is this a bug with the MessageParser?)") return False diff --git a/public/index.html b/public/index.html index 5fae6cb..51c5c9e 100644 --- a/public/index.html +++ b/public/index.html @@ -6,8 +6,10 @@ Document