LinuxGlobalHotkeys 1.0.0

dotnet add package LinuxGlobalHotkeys --version 1.0.0                
NuGet\Install-Package LinuxGlobalHotkeys -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LinuxGlobalHotkeys" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LinuxGlobalHotkeys --version 1.0.0                
#r "nuget: LinuxGlobalHotkeys, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LinuxGlobalHotkeys as a Cake Addin
#addin nuget:?package=LinuxGlobalHotkeys&version=1.0.0

// Install LinuxGlobalHotkeys as a Cake Tool
#tool nuget:?package=LinuxGlobalHotkeys&version=1.0.0                

Linux Global Hotkeys

A .NET library for registering global hotkeys/shortcuts in Linux X11 environments.

Features

  • Register global keyboard shortcuts that work system-wide
  • Support for common modifiers (Alt, Ctrl, Shift, Super/Meta)
  • Simple API with callback-based event handling
  • Proper resource management with IDisposable pattern

Requirements

  • Linux with X11/XWayland
  • .NET 6.0 or higher
  • libX11 installed on the system

Installation

dotnet add package LinuxGlobalHotkeys

Usage

using LinuxGlobalHotkeys;

// Create the hotkey manager
using (var hotkeyManager = new GlobalHotkeyManager())
{
    // Register Alt+Q shortcut
    hotkeyManager.RegisterShortcut("Alt+Q", () => {
        Console.WriteLine("Alt+Q was pressed!");
        // Do something when Alt+Q is pressed
    });
    
    // Register Ctrl+S shortcut
    hotkeyManager.RegisterShortcut("Ctrl+S", () => {
        Console.WriteLine("Ctrl+S was pressed!");
        // Do something when Ctrl+S is pressed
    });
    
    // Wait for program to exit
    Console.WriteLine("Press Enter to exit");
    Console.ReadLine();
}

Supported Modifiers

  • Alt
  • Ctrl or Control
  • Shift
  • Super, Meta, Win, or Windows (Windows/Command key)

ok bye

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • X11 (>= 1.0.6)

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 63 3/15/2025