All Projects → mrousavy → Hotkeys

mrousavy / Hotkeys

Licence: MIT license
🔤 A small C# (.NET) Library which allows binding of global HotKeys to any Application's Windows (including Windows Apps such as explorer.exe), even in Background. (using P/Invokes)

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Hotkeys

Volumey
Volume mixer that allows you to set up global hotkeys to control your Windows audio system.
Stars: ✭ 139 (+110.61%)
Mutual labels:  hotkeys, global-hotkeys
ocaml-tracy
Bindings to the Tracy profiler
Stars: ✭ 21 (-68.18%)
Mutual labels:  bindings
mapbox-ios-binding
Xamarin binding library for Mapbox iOS SDK
Stars: ✭ 15 (-77.27%)
Mutual labels:  bindings
DotNetJS
Consume C# in JavaScript with comfort: single-file UMD library, auto-generated 2-way bindings and type definitions
Stars: ✭ 551 (+734.85%)
Mutual labels:  bindings
hoedown
rust bindings for hoedown
Stars: ✭ 16 (-75.76%)
Mutual labels:  bindings
gfort2py
Library to allow calling fortran code from python
Stars: ✭ 60 (-9.09%)
Mutual labels:  bindings
ggshield
Find and fix 360+ types of hardcoded secrets and 70+ types of infrastructure-as-code misconfigurations.
Stars: ✭ 1,272 (+1827.27%)
Mutual labels:  key
cl-wlroots
Common lisp bindings for wlroots, a library for writing Wayland compositors
Stars: ✭ 32 (-51.52%)
Mutual labels:  bindings
rsmpeg
A Rust crate that exposes FFmpeg's power as much as possible.
Stars: ✭ 390 (+490.91%)
Mutual labels:  bindings
loam
Javascript wrapper for GDAL in the browser
Stars: ✭ 174 (+163.64%)
Mutual labels:  bindings
swift-tree-sitter
Swift bindings for the tree-sitter parsing library
Stars: ✭ 29 (-56.06%)
Mutual labels:  bindings
keys
⌨️ Keyboard Shortcuts for 'shiny'
Stars: ✭ 37 (-43.94%)
Mutual labels:  hotkeys
htaglib
Haskell bindings for TagLib, an audio meta-data library
Stars: ✭ 20 (-69.7%)
Mutual labels:  bindings
tool-db
A peer-to-peer decentralized database
Stars: ✭ 15 (-77.27%)
Mutual labels:  key
imgui
ImGui bindings for Nim via cimgui
Stars: ✭ 117 (+77.27%)
Mutual labels:  bindings
samp-rs
SA:MP SDK written in Rust
Stars: ✭ 36 (-45.45%)
Mutual labels:  bindings
keybind
ClojureScript key bindings (shortcut) library
Stars: ✭ 85 (+28.79%)
Mutual labels:  hotkeys
winrar-keygen
Principle of WinRAR key generation.
Stars: ✭ 398 (+503.03%)
Mutual labels:  key
jquery-bindings
Simple two-way data binding using proxies and requestIdleCallback
Stars: ✭ 17 (-74.24%)
Mutual labels:  bindings
iOSUtilitiesSource
IOS Utilities Library for Swift
Stars: ✭ 46 (-30.3%)
Mutual labels:  key

Hotkeys

A small C# (.NET) Library which allows binding of global HotKeys to any Application's Windows (including Windows Apps such as explorer.exe), even in Background. (using P/Invokes)

Install

Install from NuGet

Install-Package GlobalHotkeys

NuGet

(or download the Library (.dll) manually)

Buy Me a Coffee at ko-fi.com

Usage

Example (C#, in a WPF Application):

using mrousavy;
// ...
var key = new HotKey(
    (ModifierKeys.Control | ModifierKeys.Alt), 
    Key.S, 
    this, 
    (hotkey) => {
        MessageBox.Show("Ctrl + Alt + S was pressed!");
    }
);
// ...
key.Dispose();

Note #1: Since HotKey implements the IDisposable interface, you must call Dispose() to unregister the Hotkey, e.g. when your Window closes. Keep in mind that when you're using using(...) { ... }, the HotKey gets unregistered and disposed once you exit the using-statement's scope.

Note #2: Use the binary or operator (|) to combine key combinations for the constructor.

Note #3: Use a Window Reference as the third Argument. This may be a WPF Window, a WindowInteropHelper, or a Window Handle (IntPtr). So you can use your own WPF/WinForms Window, as well as another process's Window using it's Handle. Keep in mind that this is sketchy behaviour and not the intention of this library.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].