Skip to main content

qmk_hid/
cli.rs

1use clap::Parser;
2
3use crate::constants::{USAGE_ID, USAGE_PAGE};
4
5#[derive(Parser, Debug, Clone)]
6#[command(version, about)]
7pub struct Cli {
8    /// The vendor ID of the keyboard, see info.json
9    #[clap(short, long)]
10    pub vendor_id: u16,
11
12    /// The product ID of the keyboard, see info.json
13    #[clap(short, long)]
14    pub product_id: u16,
15
16    /// The usage page of the Raw HID interface
17    #[clap(default_value_t = USAGE_ID)]
18    pub usage_id: u16,
19
20    /// The usage ID of the Raw HID interface
21    #[clap(default_value_t = USAGE_PAGE)]
22    pub usage_page: u16,
23
24    /// Polling interval for the connection in ms
25    #[clap(default_value_t = 3000)]
26    pub poll_interval: u64,
27}