Update mouse library

This commit is contained in:
coolneng 2022-06-10 20:03:25 +02:00
parent d62667a652
commit ad319e19af
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
12 changed files with 2 additions and 12 deletions

View File

@ -166,10 +166,6 @@ def on_button(callback, args=(), buttons=(LEFT, MIDDLE, RIGHT, X, X2), types=(UP
callback(*args)
_listener.add_handler(handler)
return handler
def on_pressed(callback, args=()):
""" Invokes `callback` with `args` when the left button is pressed. """
return on_button(callback, args, [LEFT], [DOWN])
def on_click(callback, args=()):
""" Invokes `callback` with `args` when the left button is clicked. """

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -20,8 +20,6 @@ EV_REL = 0x02
EV_ABS = 0x03
EV_MSC = 0x04
INVALID_ARGUMENT_ERRNO = 22
def make_uinput():
import fcntl, struct
@ -31,12 +29,8 @@ def make_uinput():
fcntl.ioctl(uinput, UI_SET_EVBIT, EV_KEY)
UI_SET_KEYBIT = 0x40045565
try:
for i in range(0x300):
fcntl.ioctl(uinput, UI_SET_KEYBIT, i)
except OSError as e:
if e.errno != INVALID_ARGUMENT_ERRNO:
raise e
for i in range(256):
fcntl.ioctl(uinput, UI_SET_KEYBIT, i)
BUS_USB = 0x03
uinput_user_dev = "80sHHHHi64i64i64i64i"

Binary file not shown.

Binary file not shown.