Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ldrahnik committed Jun 26, 2023
1 parent 929506a commit 24f0fce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions asus_stylus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion asus_stylus.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ TimeoutSec=5
Restart=on-failure

[Install]
WantedBy=default.target
WantedBy=default.target

0 comments on commit 24f0fce

Please sign in to comment.