pub struct DeviceConfig {
pub button_bindings: BTreeMap<ButtonId, Action>,
pub per_app_bindings: BTreeMap<String, BTreeMap<ButtonId, Action>>,
pub gesture_bindings: BTreeMap<GestureDirection, Action>,
pub dpi_presets: Vec<u32>,
}Expand description
Settings scoped to a single physical device (keyed by HID++ model+ext).
Fields§
§per_app_bindings: BTreeMap<String, BTreeMap<ButtonId, Action>>Per-application binding overlays (P1.4). Keyed by bundle identifier
(e.g. "com.microsoft.VSCode" on macOS). When the foreground app’s
id matches a key here, those bindings take precedence; anything not
listed falls through to button_bindings.
gesture_bindings: BTreeMap<GestureDirection, Action>Sub-bindings for the gesture button: hold + swipe direction or a
plain click. Edited via the gesture picker; the legacy single
button_bindings[GestureButton] entry is ignored on devices that
have entries here. Hardware dispatch is a P1.5 follow-up.
dpi_presets: Vec<u32>Ordered list of DPI presets cycled through by
Action::CycleDpiPresets and indexed by
Action::SetDpiPreset. Empty means “no presets configured” —
the cycle action becomes a no-op until the user adds at least one.
Trait Implementations§
Source§impl Clone for DeviceConfig
impl Clone for DeviceConfig
Source§fn clone(&self) -> DeviceConfig
fn clone(&self) -> DeviceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more