pub enum RotationStatus {
Inactive,
Start,
Active,
Stop,
}Expand description
Where a thumbwheelEvent sits in the life cycle of one roll
(thumbwheelEvent byte 4).
This is what separates a deliberate tap from the tap the wheel’s touch
sensor flags for the finger that rolled it: every report from Start
through Stop belongs to a roll, so a tap bit inside that span is an
artifact of the same contact. Only RotationStatus::Inactive means the
wheel is at rest and a tap is the user’s own.
RotationStatus::Stop is why this field is read rather than inferred
from the report’s own rotation. Observed on an MX Master 4 (Bolt) with
examples/thumbwheel_trace, one nudge of the wheel:
rot= -1 byte4=0x02 byte5=0x02 touch=true → Active
rot= 0 byte4=0x03 byte5=0x00 touch=false → StopThe release reports no rotation at all, so rotation alone cannot tell it
from a tap on a settled wheel — and on a wheel that does support
single_tap that release is exactly where the artifact lands.
Variants§
Inactive
No rotation — the wheel is at rest.
Start
The first rotation report of a roll.
Active
A subsequent rotation report.
Stop
The roll ended: released, no touch.
Implementations§
Source§impl RotationStatus
impl RotationStatus
Sourcepub fn is_rolling(self) -> bool
pub fn is_rolling(self) -> bool
Whether this report belongs to a roll — including its Stop, which
carries no rotation of its own but is still the roll’s own contact.
Trait Implementations§
Source§impl Clone for RotationStatus
impl Clone for RotationStatus
Source§fn clone(&self) -> RotationStatus
fn clone(&self) -> RotationStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more