Update mouse library
This commit is contained in:
parent
d62667a652
commit
ad319e19af
|
@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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.
Loading…
Reference in New Issue