Skip to content

Instantly share code, notes, and snippets.

View Amgarak's full-sized avatar

Святослав Amgarak

View GitHub Profile
@Amgarak
Amgarak / Hook-Python.md
Last active April 1, 2024 21:09
Windows, Input Listener, Keyboard Events, Mouse Events, Hook, Python, Windows API, Low-Level Hook, low-level hooks, hooks, Input Monitoring, Code Snippet, Hook Python

Keyboard and Mouse Input Listener for Windows - Python

This Gist contains a Python class 'InputListener' that implements a simple input listener for keyboard and mouse events in Windows. The class provides methods to add event handlers for keyboard and mouse events, making it easy to capture and respond to user input.

Features:

Listens to keyboard events such as key down and key up. Monitors mouse events including mouse movement, clicks, wheel scrolling, and extra mouse buttons. Supports customizable event handling with callback functions. Usage: