Skip to main content

classify_input_devices_with

Function classify_input_devices_with 

Source
pub fn classify_input_devices_with<F>(
    devices: &[InputDevice],
    model_name: F,
) -> (Vec<String>, Vec<String>)
where F: Fn(&str) -> Option<String>,
Expand description

Classifies a whole device list into (keyboards, mice), de-duplicated by name.

De-duplication matters on real hardware: one physical peripheral routinely registers several evdev nodes under the same name (a receiver exposing separate endpoints), and listing it repeatedly is noise rather than information.