qmk-hid 0.1.0

A simple CLI for bidirectional communication with QMK keyboards using raw HID.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::thread;

use clap::Parser;
use qmk_hid::{cli::Cli, messenger::HidMessenger};

fn main() {
    let config = Cli::parse();

    let mut hid_read = HidMessenger::new(config.clone());
    let mut hid_write = HidMessenger::new(config);

    let read_thread = thread::spawn(move || hid_read.read_device_loop());
    let write_thread = thread::spawn(move || hid_write.read_stdin_loop());

    read_thread.join().unwrap();
    write_thread.join().unwrap();
}