{"id":15107104,"url":"https://github.com/shadowsocks/globalhotkey","last_synced_at":"2025-09-27T05:31:34.211Z","repository":{"id":65979105,"uuid":"76842789","full_name":"shadowsocks/GlobalHotKey","owner":"shadowsocks","description":"Provides an easy way to setup system-wide hot keys and react on their events. Fork here in case something wrong with nuget or upstream repository.","archived":false,"fork":true,"pushed_at":"2016-10-30T11:00:19.000Z","size":37,"stargazers_count":7,"open_issues_count":0,"forks_count":21,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-08T01:01:04.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kyrylomyr/GlobalHotKey","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shadowsocks.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":"2016-12-19T08:24:38.000Z","updated_at":"2024-06-23T00:13:52.000Z","dependencies_parsed_at":"2023-02-19T18:15:36.124Z","dependency_job_id":null,"html_url":"https://github.com/shadowsocks/GlobalHotKey","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/shadowsocks%2FGlobalHotKey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2FGlobalHotKey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2FGlobalHotKey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2FGlobalHotKey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shadowsocks","download_url":"https://codeload.github.com/shadowsocks/GlobalHotKey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234391381,"owners_count":18824810,"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":[],"created_at":"2024-09-25T21:04:31.588Z","updated_at":"2025-09-27T05:31:33.934Z","avatar_url":"https://github.com/shadowsocks.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Global Hot Key\nProvides an easy way to setup system-wide hot keys and react on their events. Works well in both, WPF and WebForms applications without any need to use Windows API.\n\n[![NuGet version](https://badge.fury.io/nu/GlobalHotKey.svg)](https://badge.fury.io/nu/GlobalHotKey)\n[![Build status](https://ci.appveyor.com/api/projects/status/t2rscs53ixde474k?svg=true)](https://ci.appveyor.com/project/kirmir/globalhotkey-9re99)\n\n# Installation\n\nTh package is available through the NuGet by running the command\n\n```\nPM\u003e Install-Package GlobalHotKey\n```\n\n# Usage\n\nAn example below demonstrates how to register system-wide hotkey Ctrl+Alt+F5 and handle it:\n```csharp\n// Include required namespaces.\nusing System.Windows.Input;\nusing GlobalHotKey;\n\n// Create the hotkey manager.\nhotKeyManager = new HotKeyManager();\n\n// Register Ctrl+Alt+F5 hotkey. Save this variable somewhere for the further unregistering.\nvar hotKey = hotKeyManager.Register(Key.F5, ModifierKeys.Control | ModifierKeys.Alt);\n\n// Handle hotkey presses.\nhotKeyManager.KeyPressed += HotKeyManagerPressed;\n\nprivate void HotKeyManagerPressed(object sender, KeyPressedEventArgs e)\n{\n    if (e.HotKey.Key == Key.F5)\n        MessageBox.Show(\"Hot key pressed!\");\n}\n\n// Unregister Ctrl+Alt+F5 hotkey.\nhotKeyManager.Unregister(hotKey);\n\n// Dispose the hotkey manager.\nhotKeyManager.Dispose();\n```\n\n`HotKeyManager` class registers and unregisters system-wide hotkeys, handles them, and raises an event on hotkeys pressing. `KeyPressedEventArgs` class contains information about pressed hotkey and keys modifiers.\nNote, that it is not necessary to unregister all hotkeys manually before closing application, because `Dispose()` does it. Make sure that it is called.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowsocks%2Fglobalhotkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowsocks%2Fglobalhotkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowsocks%2Fglobalhotkey/lists"}