Keyboard
- class gpype.backend.sources.keyboard.Keyboard[source]
Bases:
EventSourceKeyboard input for capturing key press and release events.
Monitors key press and release events and converts them to numbers: a press emits the key’s Windows virtual-key code, on every platform, and a release emits 0. So the arrow keys are 37 to 40 (left, up, right, down) on Windows, macOS and Linux alike. A key Windows has no code for emits -1.
On macOS the app that runs Python – Terminal, or your IDE – needs Input Monitoring (System Settings > Privacy & Security). Without it no key arrives and nothing fails. pynput’s warning that the process must be added to accessibility clients names the wrong permission.
- class Configuration[source]
Bases:
ConfigurationConfiguration class for Keyboard source parameters.