#communicate #driver #libusb #logitech #accompanying #devices #g13-manager

g13

libusb based crate to communicate with a Logitech G13 without accompanying drivers

1 unstable release

0.1.0 Jan 3, 2023

#1064 in Hardware support

Download history 186/week @ 2024-03-13 585/week @ 2024-03-20 277/week @ 2024-03-27 125/week @ 2024-04-03 336/week @ 2024-04-10 135/week @ 2024-04-17 280/week @ 2024-04-24 541/week @ 2024-05-01 185/week @ 2024-05-08 205/week @ 2024-05-15 85/week @ 2024-05-22 25/week @ 2024-05-29 36/week @ 2024-06-05 9/week @ 2024-06-12 6/week @ 2024-06-19 858/week @ 2024-06-26

931 downloads per month

MIT license

10KB
190 lines

g13-rs

libusb based crate to communicate with a Logitech G13 without accompanying drivers.

Installation

cargo add g13

Usage

To access a G13 device instantiate a new G13Manager and call discover on it.

use g13::*;

let mut manager = G13Manager::new()?;
let mut devices: Vec<G13> = manager.discover()?;

LCD

Use clear_lcd to clear the lcd.

You can use write_lcd with a 960 bytes large buffer to write to the display.

Keyboard

To set the keyboard color use set_key_color with a tuple of RGB bytes.

The Mode LEDs (M1, M2, M3 and MR) can be set with the ModeLeds bit flags.

To read keyboard input call read which will wait for the next interrupt until the given timeout is reached.

Dependencies

~1.7–2.4MB
~52K SLoC