diff --git a/mouse/__init__.py b/mouse/__init__.py index 71a9d14..3a21f46 100644 --- a/mouse/__init__.py +++ b/mouse/__init__.py @@ -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. """ diff --git a/mouse/__init__.pyc b/mouse/__init__.pyc deleted file mode 100644 index 0e8936f..0000000 Binary files a/mouse/__init__.pyc and /dev/null differ diff --git a/mouse/__pycache__/__init__.cpython-38.pyc b/mouse/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 80e1dc4..0000000 Binary files a/mouse/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/mouse/__pycache__/_generic.cpython-38.pyc b/mouse/__pycache__/_generic.cpython-38.pyc deleted file mode 100644 index f58ab70..0000000 Binary files a/mouse/__pycache__/_generic.cpython-38.pyc and /dev/null differ diff --git a/mouse/__pycache__/_mouse_event.cpython-38.pyc b/mouse/__pycache__/_mouse_event.cpython-38.pyc deleted file mode 100644 index 5839c75..0000000 Binary files a/mouse/__pycache__/_mouse_event.cpython-38.pyc and /dev/null differ diff --git a/mouse/__pycache__/_nixcommon.cpython-38.pyc b/mouse/__pycache__/_nixcommon.cpython-38.pyc deleted file mode 100644 index c614439..0000000 Binary files a/mouse/__pycache__/_nixcommon.cpython-38.pyc and /dev/null differ diff --git a/mouse/__pycache__/_nixmouse.cpython-38.pyc b/mouse/__pycache__/_nixmouse.cpython-38.pyc deleted file mode 100644 index 90d0e73..0000000 Binary files a/mouse/__pycache__/_nixmouse.cpython-38.pyc and /dev/null differ diff --git a/mouse/_generic.pyc b/mouse/_generic.pyc deleted file mode 100644 index f50aff6..0000000 Binary files a/mouse/_generic.pyc and /dev/null differ diff --git a/mouse/_mouse_event.pyc b/mouse/_mouse_event.pyc deleted file mode 100644 index 3c80f97..0000000 Binary files a/mouse/_mouse_event.pyc and /dev/null differ diff --git a/mouse/_nixcommon.py b/mouse/_nixcommon.py index a77de1d..d240f99 100644 --- a/mouse/_nixcommon.py +++ b/mouse/_nixcommon.py @@ -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" diff --git a/mouse/_nixcommon.pyc b/mouse/_nixcommon.pyc deleted file mode 100644 index 1112fea..0000000 Binary files a/mouse/_nixcommon.pyc and /dev/null differ diff --git a/mouse/_nixmouse.pyc b/mouse/_nixmouse.pyc deleted file mode 100644 index 13515f6..0000000 Binary files a/mouse/_nixmouse.pyc and /dev/null differ