From 5dad8b212790b572b8cc74f673ee190564e41dc5 Mon Sep 17 00:00:00 2001 From: rrr-marble Date: Tue, 12 Oct 2021 17:28:37 +0300 Subject: [PATCH] fix: docs --- Cargo.toml | 1 - src/main.rs | 6 +++++- src/pedals.rs | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1bdfefb..81fff20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,6 @@ version = "0.2.1" authors = ["rrr-marble "] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] evdev = "0.11.1" diff --git a/src/main.rs b/src/main.rs index 020417b..599c422 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,9 +14,13 @@ symbols or meanings takes place. As such this program requires access to /dev/input and /dev/uinput interfaces. It can be granted by input and uinput user groups or superuser privileges. +Grabs input device through a kernel syscall. This prevents other devices +(including kernel-internal ones such as rfkill) from receiving events +from the device. + # Usage -./dpk [/PATH/TO/INPUT/DEVICE] +dpk [/PATH/TO/INPUT/DEVICE] */ use std::io::Write; //for .flush() diff --git a/src/pedals.rs b/src/pedals.rs index 6b65dff..0b7d6d5 100644 --- a/src/pedals.rs +++ b/src/pedals.rs @@ -5,8 +5,8 @@ pub use crate::Pedal; use evdev::{EventType, InputEvent, Key}; -/// Repeatedly press the key with given intervals -/// and send these keypresses into transmit channel +/// Press and release the key with given intervals +/// then send these keypresses into transmit channel /// mash! (key to press, /// down time(while pressed), /// up time(between presses), @@ -91,6 +91,7 @@ pub fn pedals() -> Vec { ] } +/// Returns a vector of currently requred for pedals virtual buttons pub fn buttons() -> Vec { vec![ Key::KEY_F,