pub struct WheelResolution {
pub native_res: u16,
pub diverted_res: u16,
}Expand description
What one revolution of the wheel measures in each reporting mode.
The two are not the same unit: an MX Master 4 reports 20 ratchets per revolution natively and 120 increments per revolution diverted. Anything re-synthesising scroll from diverted increments has to scale by the ratio, or the same physical motion scrolls six times as far as it did before the wheel was diverted.
Fields§
§native_res: u16Ratchets per revolution in native (HID) mode.
diverted_res: u16Rotation increments per revolution in diverted (HID++) mode.
Implementations§
Source§impl WheelResolution
impl WheelResolution
Sourcepub const UNKNOWN: Self
pub const UNKNOWN: Self
Resolutions a wheel did not report, scaling increments through unchanged.
Sourcepub fn native_per_increment(self) -> f32
pub fn native_per_increment(self) -> f32
Native scroll units one diverted increment is worth.
1.0 when either resolution is missing — a wheel that did not answer
getThumbwheelInfo keeps the raw increment-per-unit behavior rather
than having its scroll silently scaled by a guess.
Trait Implementations§
Source§impl Clone for WheelResolution
impl Clone for WheelResolution
Source§fn clone(&self) -> WheelResolution
fn clone(&self) -> WheelResolution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more