#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

#959 in Hardware support

Download history 28/week @ 2023-12-15 392/week @ 2023-12-22 203/week @ 2023-12-29 57/week @ 2024-01-05 887/week @ 2024-01-12 517/week @ 2024-01-19 374/week @ 2024-01-26 381/week @ 2024-02-02 727/week @ 2024-02-09 536/week @ 2024-02-16 461/week @ 2024-02-23 234/week @ 2024-03-01 120/week @ 2024-03-08 90/week @ 2024-03-15 678/week @ 2024-03-22 182/week @ 2024-03-29

1,134 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.8–2.6MB
~56K SLoC