mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-31 17:10:54 +03:00
remove cli frontend in favour of cli subcommand (#278)
this removes the cli frontend entirely, replacing it with a subcommand instead
This commit is contained in:
committed by
GitHub
parent
7898f2362c
commit
2f6a3629ad
@@ -1,4 +1,5 @@
|
||||
use crate::config::Config;
|
||||
use clap::Args;
|
||||
use input_emulation::{InputEmulation, InputEmulationError};
|
||||
use input_event::{Event, PointerEvent};
|
||||
use std::f64::consts::PI;
|
||||
@@ -7,7 +8,17 @@ use std::time::{Duration, Instant};
|
||||
const FREQUENCY_HZ: f64 = 1.0;
|
||||
const RADIUS: f64 = 100.0;
|
||||
|
||||
pub async fn run(config: Config) -> Result<(), InputEmulationError> {
|
||||
#[derive(Args, Debug, Eq, PartialEq)]
|
||||
pub struct TestEmulationArgs {
|
||||
#[arg(long)]
|
||||
mouse: bool,
|
||||
#[arg(long)]
|
||||
keyboard: bool,
|
||||
#[arg(long)]
|
||||
scroll: bool,
|
||||
}
|
||||
|
||||
pub async fn run(config: Config, _args: TestEmulationArgs) -> Result<(), InputEmulationError> {
|
||||
log::info!("running input emulation test");
|
||||
|
||||
let backend = config.emulation_backend.map(|b| b.into());
|
||||
|
||||
Reference in New Issue
Block a user