G19USB 1.0.0
dotnet add package G19USB --version 1.0.0
NuGet\Install-Package G19USB -Version 1.0.0
<PackageReference Include="G19USB" Version="1.0.0" />
<PackageVersion Include="G19USB" Version="1.0.0" />
<PackageReference Include="G19USB" />
paket add G19USB --version 1.0.0
#r "nuget: G19USB, 1.0.0"
#:package G19USB@1.0.0
#addin nuget:?package=G19USB&version=1.0.0
#tool nuget:?package=G19USB&version=1.0.0
G19USB
A .NET library for controlling the Logitech G19 / G19s keyboard's 320×240 colour LCD display and programmable G/M/L-keys over direct USB, using the libusbK driver. No Logitech Gaming Software required.
Driver Setup
MirrorG19s (and this library) talks directly to the G19s LCD over USB. You need to replace the default Logitech driver for the G19s composite parent interface with the libusbK driver using Zadig.
- Uninstall Logitech Gaming Software (LGS) if installed — it conflicts with the libusbK driver.
- Download Zadig from https://zadig.akeo.ie and run it.
- In Zadig, open Options and:
- Check List All Devices
- Uncheck Ignore Hubs or Composite Parents
- In the device dropdown, select G19s Gaming Keyboard (Composite Parent) with USB ID
046D C229.There may be two entries with similar names — pick the one whose USB ID ends in C229.
- In the driver dropdown (right of the green arrow) select libusbK (not WinUSB).
- Click Replace Driver.
⚠️ Only replace the driver for the G19s composite parent (ID
046D C229). Do not replace drivers for other Logitech devices you still rely on Logitech software for.To revert, open Device Manager, find the device under the libusbK node, right-click → Update driver → Let Windows find one automatically.
Installation
dotnet add package G19USB
Requires .NET 10 (Windows only).
Quick Start
using G19USB;
using var device = new G19Device();
device.OpenDevice();
// Subscribe to key events
device.KeysChanged += (_, e) =>
{
if (e.Keys != G19Keys.None)
Console.WriteLine($"Keys pressed: {G19Helpers.GetKeyString(e.Keys)}");
};
device.StartKeyboardMonitoring();
// Send a frame to the 320×240 LCD (153600-byte RGB565 pixel buffer)
byte[] frame = G19Helpers.CreateTestPattern();
device.UpdateLcd(frame);
// Light up the M1 LED
device.SetMKeyLEDs(G19Keys.M1);
Console.ReadKey(true);
device.StopKeyboardMonitoring();
device.CloseDevice();
API Overview
| Type | Description |
|---|---|
IG19Device |
Interface: KeysChanged event, OpenDevice/CloseDevice, UpdateLcd, SetMKeyLEDs |
G19Device |
Concrete implementation combining LCD and Keyboard sub-components |
LCD |
Async write queue for bulk-USB LCD updates; UpdateScreen(byte[]), SetBacklightColor, SetBrightness |
Keyboard |
Interrupt-IN polling for L-keys (0x81) and G/M-keys (0x83); fires KeysChanged |
G19Keys |
[Flags] enum: LHome…LUp (bits 0–7), G1–G12 (bits 8–19), M1/M2/M3/MR (bits 20–23) |
G19Constants |
USB VID/PID (0x046D/0xC229), LCD dimensions (320×240), endpoint addresses, LCD header |
G19Helpers |
ConvertBitmapToRGB565, CreateSolidColor, CreateTestPattern, GetKeyString |
Building from Source
git clone https://github.com/MagicMau/G19USB.git
cd G19USB
dotnet build G19USB\G19USB.csproj -c Release
Run the basic sample (requires a connected G19/G19s with libusbK driver):
dotnet run --project samples\G19USB.BasicSample
Attribution
Based on libg19 by James Geboski: https://github.com/jgeboski/libg19
See NOTICE for full attribution details.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- LibUsbDotNet (>= 2.2.75)
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 | 32 | 3/10/2026 |