Skip to main content

detect_input_devices

Function detect_input_devices 

Source
pub fn detect_input_devices() -> (Vec<String>, Vec<String>)
Expand description

Detects connected keyboards and pointing devices as (keyboards, mice).

Linux reads /proc/bus/input/devices plus, only for ambiguous devices, a small sysfs lookup. macOS enumerates IOKit IOHIDDevice interfaces and reads their primary usage. Returns two empty vectors elsewhere, so both fields simply do not render. No subprocess and no elevation on either platform.