boppreh/keyboard

Hook and simulate global keyboard events on Windows and Linux.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 57 minutes ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 17th, 2026
Created on May 7th, 2013
Open Issues & Pull Requests: 414 (+0)
GitHub issues: Enabled
Number of forks: 450
Total Stargazers: 3,969 (+0)
Total Subscribers: 74 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 20.7 days
Mean response time: 152.4 days
90th percentile: 428.2 days
Tracked items: 30

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 36
New in 7 days: 1
Closed in 7 days: 1
Avg open age: 1,000 days
Stale 30+ days: 34
Stale 90+ days: 29

Recent activity

Opened in 7 days: 1
Closed in 7 days: 1
Comments in 7 days: 1
Events in 7 days: 1

Top labels

  • bug (2)
  • linux (1)
  • windows (1)

Most active issues this week

Detailed Description

keyboard is a Python library that hooks and simulates global keyboard events on Windows and Linux.

The library solves the problem of capturing keyboard input globally, regardless of which application has focus, and simulating key presses programmatically. It works by installing system-level keyboard hooks that operate in a separate thread, allowing applications to listen for and respond to keyboard events without blocking the main program. The tool supports complex hotkey combinations with configurable timeouts and includes high-level APIs for recording and playing back keyboard sequences, as well as text abbreviation expansion. It handles keyboard layouts correctly through full internationalization support, allowing developers to work with keys as they appear in the user's actual layout rather than raw scancodes.

The tool suits projects that need global keyboard monitoring or automation on Windows or Linux systems. It requires no compilation or external dependencies, making deployment straightforward—the source files can simply be copied into a project. Developers should be aware that the project is currently unmaintained, though it works for many use cases. Key limitations include that key suppression only works on Windows, Linux usage requires root access to read raw device files, and media keys on Linux may not be recognized. The library cannot detect keyboard events if other applications have registered hooks that consume all events, and it should not be used for keylogging or online gaming automation.

Development activity shows infrequent commits with substantial gaps between updates. The project has accumulated unresolved issues related to platform-specific functionality, including device identification on Windows, media key support on Linux, and key blocking capabilities. Documentation exists but remains incomplete relative to the full API surface. The codebase supports both Python 2 and 3, though this dual compatibility is increasingly outdated.