Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

globalmousekeyhook

> 编程语言
Open source

This library allows you to tap keyboard and mouse, detect and record their activity even when an application is inactive and runs in background.

1.1K stars0 likes0 views
WebsiteGitHub

About

This library allows you to tap keyboard and mouse, detect and record their activity even when an application is inactive and runs in background.

nuget master

NEWS!

Added support for the detection of key combinations and sequences see: Quickstart - Detecting Key Combinations and Sequences

What it does?

This library allows you to tap the keyboard and mouse, to detect and record their activity even when an application is inactive and runs in the background.

Prerequisites

  • Windows: .NET Framework 4.0+

Installation and sources

nuget install MouseKeyHook

  • NuGet package
  • Source code

Usage

…

(also have a look at the Demo app included with the source)

How does it work?

This library attaches to windows global hooks, tracks keyboard and mouse clicks, movements and raises common .NET events with KeyEventArgs and MouseEventArgs, so you can easily retrieve any information you need:

  • Mouse coordinates
  • Mouse buttons clicked
  • Mouse drag actions
  • Mouse wheel scrolls
  • Key presses and releases
  • Special key states

Additionally, there are MouseEventExtArgs and KeyEventExtArgs which provide further options:

  • Input suppression
  • Timestamp
  • IsMouseDown/Up
  • IsKeyDown/Up.

Troubleshooting and support

  • Usage or programming-related questions? Post it on StackOverflow using the tag mousekeyhook
  • Found a bug or missing a feature? Feed the issue tracker

Current project build status

The CI builds are generously hosted and run on the Travis and AppVeyor infrastructures.

Travis-CI AppVeyor
master master master
vNext vNext vNext

History

Year URL
2000 - 2008 http://www.codeproject.com/KB/cs/globalhook.aspx
2008 - 2015 https://globalmousekeyhook.codeplex.com/
2015 - now https://github.com/gmamaladze/globalmousekeyhook

Quick contributing guide

  • Fork and clone locally
  • Create a topic specific branch. Add some nice feature.
  • Send a Pull Request to spread the fun!

License

The MIT license see: LICENSE.txt

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言