pynput Package Documentation¶
This library allows you to control and monitor input devices.
It contains subpackages for each type of input device supported:
pynput.mouse
- Contains classes for controlling and monitoring a mouse or trackpad.
pynput.keyboard
- Contains 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