{"id":16561907,"url":"https://github.com/lontivero/open.winkeyboardhook","last_synced_at":"2025-10-28T23:30:42.272Z","repository":{"id":16870728,"uuid":"19631093","full_name":"lontivero/Open.WinKeyboardHook","owner":"lontivero","description":"A simple and easy-to-use .NET managed wrapper for Low Level Keyboard hooking.","archived":false,"fork":false,"pushed_at":"2019-01-09T10:08:56.000Z","size":16,"stargazers_count":21,"open_issues_count":3,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-01T19:02:52.398Z","etag":null,"topics":["c-sharp","hooking","keyboard","keyboard-events","keyboard-shortcut","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lontivero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-10T02:02:47.000Z","updated_at":"2023-05-08T03:20:36.000Z","dependencies_parsed_at":"2022-07-26T11:02:04.873Z","dependency_job_id":null,"html_url":"https://github.com/lontivero/Open.WinKeyboardHook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lontivero%2FOpen.WinKeyboardHook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lontivero%2FOpen.WinKeyboardHook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lontivero%2FOpen.WinKeyboardHook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lontivero%2FOpen.WinKeyboardHook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lontivero","download_url":"https://codeload.github.com/lontivero/Open.WinKeyboardHook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238737882,"owners_count":19522268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","hooking","keyboard","keyboard-events","keyboard-shortcut","windows"],"created_at":"2024-10-11T20:34:41.358Z","updated_at":"2025-10-28T23:30:41.971Z","avatar_url":"https://github.com/lontivero.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/lvi07odtaoeeohe3)](https://ci.appveyor.com/project/lontivero/open-winkeyboardhook) [![NuGet version](https://badge.fury.io/nu/Open.WinKeyboardHook.svg)](http://badge.fury.io/nu/Open.WinKeyboardHook)\n\nOpen.WinKeyboardHook\n====================\n\nA simple and easy-to-use .NET managed wrapper for Low Level Keyboard hooking.\n\nGoals\n-----\nThe main goal is to abstract away the complexities inherit to intercept and translate global keystrokes (KeyDown / KeyUp / KeyPress) in the system. \n\n\nUsage\n-----\n```c#\npublic partial class TestForm : Form\n{\n    private readonly IKeyboardInterceptor _interceptor;\n\n    public TestForm()\n    {\n        InitializeComponent();\n\n        // Everytime a key is press we want to display it in a TextBox\n        _interceptor = new KeyboardInterceptor();\n        _interceptor.KeyPress += (sender, args) =\u003e txt.Text += args.KeyChar;\n    }\n\n    // Start and Stop capturing keystroks\n    private void BtnClick(object sender, EventArgs e)\n    {\n        if(!_capturing)\n        {\n            _interceptor.StartCapturing();\n            btn.Text = \"Stop\";\n            btn.BackColor = Color.Red;\n        }\n        else\n        {\n            _interceptor.StopCapturing();\n            btn.Text = \"Start\";\n            btn.BackColor = Color.Lime;\n        }\n        _capturing = !_capturing;\n    }\n}\n```\nReal world example\n------------------\nOpen.WinKeyboardHook is been used as the key component in [KeyPadawan](https://github.com/lontivero/KeyPadawan) project, a useful tool for presentation and screencasts that allow to display the shortcuts that a presenter uses.\n\n\nDevelopment\n-----------\nOpen.WinKeyboardHook is been developed by [Lucas Ontivero](http://geeks.ms/blogs/lontivero) ([@lontivero](http://twitter.com/lontivero)). You are welcome to contribute code. You can send code both as a patch or a GitHub pull request.\n\n \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flontivero%2Fopen.winkeyboardhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flontivero%2Fopen.winkeyboardhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flontivero%2Fopen.winkeyboardhook/lists"}