From 24f0fcebbad19d2d0de1696049fb9793ca49af61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Drahn=C3=ADk?= Date: Mon, 26 Jun 2023 21:47:08 +0200 Subject: [PATCH] Clean up --- asus_stylus.py | 7 ++----- asus_stylus.service | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/asus_stylus.py b/asus_stylus.py index ad748bd..d68362e 100755 --- a/asus_stylus.py +++ b/asus_stylus.py @@ -7,7 +7,7 @@ import sys from typing import Optional -from libevdev import EV_KEY, EV_SYN, EV_MSC, Device, InputEvent +from libevdev import EV_SYN, EV_MSC, Device, InputEvent # Setup logging # LOG=DEBUG sudo -E ./asus_stylus.py # all messages @@ -31,7 +31,6 @@ # Look into the devices file while tries > 0: - #keyboard_detected = 0 stylus_detected = 0 with open('/proc/bus/input/devices', 'r') as f: @@ -72,13 +71,11 @@ # Start monitoring the stylus - fd_t = open('/dev/input/event' + str(stylus), 'rb') d_t = Device(fd_t) -# Create a new device to send right clickss - +# Create a new device dev = Device() dev.name = "Asus Stylus" for key_mapping in layout.keys: diff --git a/asus_stylus.service b/asus_stylus.service index 64b1ef6..e3f0b34 100644 --- a/asus_stylus.service +++ b/asus_stylus.service @@ -11,4 +11,4 @@ TimeoutSec=5 Restart=on-failure [Install] -WantedBy=default.target +WantedBy=default.target \ No newline at end of file