pynput Package Documentation¶
This library allows you to control and monitor input devices.
It contains subpackages for each type of input device supported:
pynput.mouseContains classes for controlling and monitoring a mouse or trackpad.
pynput.keyboardContains classes for controlling and monitoring the keyboard.
All modules mentioned above are automatically imported into the pynput
package. To use any of them, import them from the main package:
from pynput import mouse, keyboard