From bbbf8cbbf6ef510edd3abea97f4ccf4f885a6241 Mon Sep 17 00:00:00 2001 From: Petr Kracik Date: Fri, 5 Jun 2020 17:06:08 +0200 Subject: [PATCH] HID mouse: wheel --- hidinput.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hidinput.py b/hidinput.py index 06b8160..8b8171c 100644 --- a/hidinput.py +++ b/hidinput.py @@ -152,12 +152,12 @@ def handle_my_custom_event(data): x = mouseevent['x'] y = mouseevent['y'] wheel = mouseevent['wheel'] + wheel = wheel if wheel >= 0 else 255-abs(wheel) print("X: {}, Y: {}".format(x, y)) hid_mouse_writeabs(btn, x, y, wheel) - @app.route("/hid/keyboard", methods=["POST"]) def keypress(): keyevent = json.loads(request.data)