pub struct Args {
pub debounce_time: Duration,
pub near_miss_threshold_time: Duration,
pub log_interval: Duration,
pub log_all_events: bool,
pub log_bounces: bool,
pub list_devices: bool,
pub stats_json: bool,
pub verbose: bool,
pub ring_buffer_size: usize,
pub debounce_keys: Vec<u16>,
pub ignore_keys: Vec<u16>,
pub otel_endpoint: Option<String>,
}Expand description
An Interception Tools filter to eliminate keyboard chatter (switch bounce). Reads Linux input events from stdin, filters rapid duplicate key events, and writes the filtered events to stdout. Statistics are printed to stderr on exit.
Fields§
§debounce_time: DurationDebounce time threshold (milliseconds). Duplicate key events (same keycode and value)
occurring faster than this threshold are discarded. (Default: 25ms).
The “value” refers to the state of the key: 1 for press, 0 for release, 2 for repeat.
Only press and release events are debounced. Accepts values like “10ms”, “0.5s”.
near_miss_threshold_time: DurationThreshold for logging “near-miss” events. Passed key events occurring within this time of the previous passed event are logged/counted. (Default: 100ms) Accepts values like “100ms”, “0.1s”.
log_interval: DurationPeriodically dump statistics to stderr. (Default: 15m). Set to “0” to disable periodic dumps. Accepts values like “60s”, “15m”, “1h”.
log_all_events: boolLog details of every incoming event to stderr ([PASS] or [DROP]).
log_bounces: boolLog details of only dropped (bounced) key events to stderr.
list_devices: boolList available input devices and their capabilities (requires root).
stats_json: boolOutput statistics as JSON format to stderr on exit and periodic dump.
verbose: boolEnable verbose logging (internal state, thread startup, etc).
ring_buffer_size: usizeSize of the ring buffer for storing recently passed events (for debugging). Set to 0 to disable. (Default: 0).
debounce_keys: Vec<u16>Key codes or names to debounce. When present, only these keys are debounced
(all others pass through). Takes precedence over --ignore-key. Example:
--debounce-key KEY_ENTER (repeat flag for multiple keys).
ignore_keys: Vec<u16>Key codes or names to ignore (never debounce) unless they also appear in
--debounce-key. Example: --ignore-key 114 or --ignore-key KEY_VOLUMEDOWN.
otel_endpoint: Option<String>OTLP endpoint URL for exporting traces and metrics (e.g., “http://localhost:4317”).
Trait Implementations§
Source§impl Args for Args
impl Args for Args
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Args
impl CommandFactory for Args
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Args
impl Parser for Args
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnwindSafe for Args
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request