pynput - PyPI
https://pypi.org/project/pynput19.11.2021 · pynput This library allows you to control and monitor input devices. Currently, mouse and keyboard input and monitoring are supported. See here for the full documentation. Controlling the mouse Use pynput.mouse.Controller like this:
pynput · PyPI
pypi.org › project › pynputNov 19, 2021 · pynput provides the class pynput.keyboard.HotKey for this purpose. It contains two methods to update the state, designed to be easily interoperable with a keyboard listener: pynput.keyboard.HotKey.press and pynput.keyboard.HotKey.release which can be directly passed as listener callbacks. The intended usage is as follows: