NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3185 most downloaded on PyPI
Monitor and control user input devices
Last release 4 months ago
12 May 2026
Release timing varies
gaps range from 1 weeks to 2.4 years
Nearly every release is documented
notes for 58 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
63 releases · first in 2015
Add the injected argument where missing on *macOS*. Thanks to *inchargeautomation-lab*!
Add the injected argument where missing on macOS. Thanks to inchargeautomation-lab!
Do not emit duplicate scroll events on Windows. Thanks to mxschmitt!
Remove incorrectly merged line for the *Xorg* backend. Thanks to *sphh*!
Remove incorrectly merged line for the Xorg backend. Thanks to sphh!
Let events know about the new injected parameter. Thanks to phpjunkie420!
One column per quarter.
Add a flag to callbacks to allow detecting injected input events.
Add a flag to callbacks to allow detecting injected input events.
Add media_stop key for macOS. Thanks to laura-3!
Add eject key for macOS. Thanks to DiMNDev!
Rename method for listeners to not conflict with new threading.Thread field.
Rename method for listeners to not conflict with new threading.Thread field.
Small corrections to the documentation.
Small corrections to the documentation.
Handle explicit timeout when calling join on listeners.
Correct regression in hot key handling for special keys.
Reverted changes to lazy loading of CoreFoundation and Quartz, since this still does not appear to work. Thanks to Zach Zaiman!
Let the type of values in Key be KeyCode so that type checkers are not confused. Thanks to Amund Eggen Svandal!
Do not crash in __del__ on Xorg if display creation fails. Thanks to Gabriele Pongelli!
Correct support for emojis on Windows. Thanks to Yunus Emre!
Allow passing virtual key codes to the parser for global hot keys.
Allow passing virtual key codes to the parser for global hot keys.
Stop the recording context asynchronously on Xorg.
Do not pass None to objc.objc_object. Thanks to yejunxi!
Do not crash when pressing the alt key on uinput. Thanks to Caldas Lopes!
Use the correct option prefix for listeners derived from the backend implementations. Thanks to Yu Wang!
Corrected crashes on *Xorg* when a listener was configured to suppress system events. Thanks to *jpramosi*!
Corrected crashes on Xorg when a listener was configured to suppress system events. Thanks to jpramosi!
Improved handling of keyboard controller on Windows. The controller now has a greater change of working with applications using lower level events. Thanks to bhudax!
Updated macOS implementation to use new version of pyobjc.
Detect whether permissions are lacking on *macOS*. Thanks to *Dane Finlay*!
Detect whether permissions are lacking on macOS. Thanks to Dane Finlay!
Eagerly import symbols from CoreFoundation and Quartz. Thanks to Ronald Oussoren!
Improved handling of dumpkeys utility. Thanks to Markus Niedermann!
Removed ambiguous license file.
Corrected *keysym* handling on *Xorg*; not all groups were loaded, and the fallback to our internal tables was never triggered. Thanks to *Philipp Kla
Corrected keysym handling on Xorg; not all groups were loaded, and the fallback to our internal tables was never triggered. Thanks to Philipp Klaus!
Updated the version of Quartz used for the macOS backend to allow pynput to be installed on Big Sur. Thanks to Michael Madden!
Added missing function keys on Windows. Thanks to Dave Atkinson!
Corrected scroll speed for mouse controller on macOS. Thanks to Albert Zeyer!
Corrected media keys for Xorg. Thanks to Gabriele N. Tornetta!
Corrected parameter name in documentation. Thanks to Jinesi Yelizati!
Corrected mapping of virtual key codes to characters for the *uinput* backend.
Corrected mapping of virtual key codes to characters for the uinput backend.
Corrected spelling errors. Thanks to Martin Michlmayr!
Corrected and improved documentation.
Corrected thanks for arbitrary unicode character support for *Xorg*.
Corrected thanks for arbitrary unicode character support for Xorg.
Added a new *uinput* based keyboard backend for *Linux*, when no *X* server is available.
Added a new uinput based keyboard backend for Linux, when no X server is available.
Allow typing arbitrary unicode characters on Xorg backend. Thanks to gdiShun!
Allow overriding the automatically selected backend with an environment variable, and added a dummy backend.
Added support for mouse side button on Windows. Thanks to danielkovarik!
Added convenience method to tap keys.
Allow specifying raw virtual key codes in hotkeys.
Improved error messages when a backend cannot be loaded.
Include more information in stringification of events.
Corrected return value of Events.get to that specified by the documentation.
Corrected keyboard listener not to type random characters on certain keyboard layouts.
Corrected errors when pressing certain keys on Windows, where the operating system reports that they are dead but no combining version exists.
Improved documentation.
Corrected lint warnings and tests.
Updated documentation.
Corrected lint warnings and tests.
Do not use internal types in argtypes for win32 functions; this renders them uncallable for other code running in the same runtime.
Include scan codes in events on Windows. Thanks to bhudax!
Correctly apply transformation to scroll event values on Windows. Thanks to DOCCA0!
Corrected infinite scrolling on *macOS* when providing non-integer deltas. Thanks to *Iván Munsuri Ibáñez*!
Corrected infinite scrolling on macOS when providing non-integer deltas. Thanks to Iván Munsuri Ibáñez!
Corrected controller and listener handling of media keys on macOS. Thanks to Iván Munsuri Ibáñez!
The code examples for the simple pynput.keyboard.HotKey now work. Thanks to *jfongattw*!
The code examples for the simple pynput.keyboard.HotKey now work. Thanks to jfongattw!
Corrected media key mappings on *macOS*. Thanks to *Luis Nachtigall*!
Corrected media key mappings on macOS. Thanks to Luis Nachtigall!
Corrected imports for keyboard Controller. Thanks to *rhystedstone*!
Corrected imports for keyboard Controller. Thanks to rhystedstone!
Corrected imports for keyboard Controller. Thanks to *Matt Iversen*!
Corrected imports for keyboard Controller. Thanks to Matt Iversen!
Corrected imports for keyboard Controller. Thanks to *Matt Iversen*!
Corrected imports for keyboard Controller. Thanks to Matt Iversen!
Corrected global hotkeys on *Windows*.
Corrected global hotkeys on Windows.
Corrected pressed / released state for keyboard listener on Windows. Thanks to segalion!
Added support for global hotkeys.
Added support for global hotkeys.
Added support for streaming listener events synchronously.
Removed media flag from *Xorg* keys.
Removed media flag from Xorg keys.
Corrected attribute names for media keys on *macOS*. Thanks to *ah3243*!
Corrected attribute names for media keys on macOS. Thanks to ah3243!
Corrected keyboard listener on *Windows*. Thanks to *akiratakasaki*, *segalion*, *SpecialCharacter*!
Corrected keyboard listener on Windows. Thanks to akiratakasaki, segalion, SpecialCharacter!
Corrected handling of some special keys, including arrow keys, when combined with modifiers on Windows. Thanks to tuessetr!
Updated documentation to include information about DPI scaling on Windows. Thanks to david-szarka!
Added experimental support for media keys. Thanks to ShivamJoker, StormTersteeg!
Corrected errors about using in operator for enums on *Python 3.8* on *macOS*.
Corrected errors about using in operator for enums on Python 3.8 on macOS.
Corrected deprecation warnings about Enum usage on *Python 3.8*.
Included commit to correctly fall back on CGEventKeyboardGetUnicodeString.
Corrected deprecation warnings about Enum usage on Python 3.8.
Correctly fall back on CGEventKeyboardGetUnicodeString.
Correctly fall back on CGEventKeyboardGetUnicodeString.
Updated documentation.
Use CGEventKeyboardGetUnicodeString in *macOS* keyboard listener to send correct characters.
Use CGEventKeyboardGetUnicodeString in macOS keyboard listener to send correct characters.
Include keysym instead of key code in Xorg keyboard listener.
Corrected logging to not include expected StopException.
Updated and corrected documentation.
Added possibility to fully suppress events when listening.
Added possibility to fully suppress events when listening.
Added support for typing some control characters.
Added support for mouse drag events on OSX. Thanks to jungledrum!
Include the key code in keyboard listener events.
Correctly handle the numeric key pad on Xorg with num lock active. Thanks to TheoRet!
Corrected handling of current thread keyboard layout on Windows. Thanks to Schmettaling!
Corrected stopping of listeners on Xorg.
Corrected import of Xlib.keysymdef.xkb on Xorg. Thanks to Glandos!
Do not crash when Xlib.display.Display.get_input_focus returns an integer, as it may when running under *Xephyr*. Thanks to *Eli Skeggs*!
Do not crash when Xlib.display.Display.get_input_focus returns an integer, as it may when running under Xephyr. Thanks to Eli Skeggs!
Corrected check for virtual key code when generating keyboard events on *OSX*. This fixes an issue where pressing *A* with *shift* explicitly pressed
Corrected check for virtual key code when generating keyboard events on OSX. This fixes an issue where pressing A with shift explicitly pressed would still type a minuscule letter.
Nothing published for this version
Include mouse buttons up to *30* for *Xorg*.
Include mouse buttons up to 30 for Xorg.
Corrected double delivery of fake keyboard events on *Windows*.
Corrected double delivery of fake keyboard events on Windows.
Corrected handling of synthetic unicode keys on Windows.
Corrected platform specifier for *Python 2* on *Linux*.
Reverted changes in 1.3.3.
Corrected platform specifier for Python 2 on Linux.
Corrected bounds check for values on *Xorg*.
Corrected bounds check for values on Xorg.
Made platform dependencies non-optional.
Made platform dependencies non-optional.
Corrected regression from previous release where button clicks would crash the *Mac* mouse listener.
Corrected regression from previous release where button clicks would crash the Mac mouse listener.
Fall back on Button.unknown for unknown mouse buttons in *Xorg* mouse listener.
Fall back on Button.unknown for unknown mouse buttons in Xorg mouse listener.
Added ability to stop event propagation on *Windows*. This will prevent events from reaching other applications.
Added ability to stop event propagation on Windows. This will prevent events from reaching other applications.
Added ability to ignore events on Windows. This is a workaround for systems where the keyboard monitor interferes with normal keyboard events.
Added ability to modify events on OSX. This allows intercepting and altering input events before they reach other applications.
Corrected crash on OSX when some types of third party input sources are installed.
Allow catching exceptions thrown from listener callbacks. This changes the API, as joining a listener now potentially raises unhandled exceptions, and
Allow catching exceptions thrown from listener callbacks. This changes the API, as joining a listener now potentially raises unhandled exceptions, and unhandled exceptions will stop listeners.
Added support for the numeric keypad on Linux.
Improved documentation.
Thanks to jollysean and gilleswijnker for their input!
Listen for and dispatch middle button mouse clicks on *Windows*.
Listen for and dispatch middle button mouse clicks on Windows.
Corrected bug in pynput.keyboard.Controller.pressed which caused it to never release the key. Many thanks to Toby Southwell!
Corrected bug in pynput.keyboard.Controller.pressed which caused it to never release the key. Many thanks to Toby Southwell!
Corrected handling of modifier keys to allow them to be composable on *Linux*.
Corrected handling of modifier keys to allow them to be composable on Linux.
Corrected error generation when GetKeyboardState fails.
Corrected error generation when GetKeyboardState fails.
Make sure to apply shift state to borrowed keys on X.
Use pylint.
* Changed *Xlib* library.
Changed Xlib library.
Added missing LPDWORD for *Python 2* on *Windows*.
Added missing LPDWORD for Python 2 on Windows.
Corrected keyboard listener on *Windows*. Modifier keys and other keys changing the state of the keyboard are now handled correctly.
Corrected keyboard listener on Windows. Modifier keys and other keys changing the state of the keyboard are now handled correctly.
Corrected mouse click and release on Windows.
Corrected code samples.
Propagate import errors raised on Linux to help troubleshoot missing Xlib module.
Propagate import errors raised on Linux to help troubleshoot missing Xlib module.
Declare python3-xlib as dependency on Linux for Python 3.
Make sure to build a universal wheel for all python versions.
Make sure to build a universal wheel for all python versions.
Added scroll speed constant for *OSX* to correct slow scroll speed.
Corrected dragging on OSX.
Added scroll speed constant for OSX to correct slow scroll speed.
Corrected name of mouse input field when sending click and scroll events.
Corrected name of mouse input field when sending click and scroll events.
Corrected use of ctypes on Windows.
Corrected use of ctypes on Windows.
Use thread identifiers to identify threads, not Thread instances.
Use thread identifiers to identify threads, not Thread instances.
Corrected bugs which prevented the library from being used on *Python 3*.
Corrected bugs which prevented the library from being used on Python 3.
Corrected minor bugs and inconsistencies.
Changed license to LGPL.
Corrected minor bugs and inconsistencies.
Corrected and extended documentation.
Added support for monitoring the keyboard.
Added support for monitoring the keyboard.
Corrected wheel packaging.
Corrected deadlock when stopping a listener in some cases on X.
Corrected key code constants on Mac OSX.
Do not intercept events on Mac OSX.
Corrected handling of dead keys.
Corrected handling of dead keys.
Corrected documentation.
* Added support for modifiers.
Added support for modifiers.
* Added keyboard controller.
Added keyboard controller.
Your coding agent can read these notes before it upgrades. Set up the MCP server →