0x2100 · verticalScrolling
Read the physical characteristics of the vertical scroll wheel — roller type, ratchets per turn, and the device's preferred scroll quantum.
Reports the physical characteristics of the device's vertical scroll wheel. The single
function get_roller_info returns a RollerInfo snapshot describing the roller
hardware and its default scroll behaviour; there are no write functions and no events.
- roller_type — the wheel mechanism:
Standard,ThreeG,MicroRatchet,Touchpad, orTouchpadNaturalDefault. - ratchets_per_turn — number of physical detents per full wheel revolution.
- scroll_lines — the device's preferred scroll quantum:
SystemDefault(defer to the OS),Lines(n)for a fixed count per detent, orPage(one full page per detent).
Spec: Logitech HID++ 2.0 — verticalScrolling. Used by: Typed wrapper in
openlogi-hidpp.
Function reference
The VerticalScrollingFeature wrapper (0x2100) exposes:
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_roller_info | 0 | () | RollerInfo |
All methods are async and return Result<…, Hidpp20Error>.
Types
RollerInfo
Vertical scrolling roller information.
| Field | Type | Description |
|---|---|---|
roller_type | RollerType | Roller type. |
ratchets_per_turn | u8 | Number of ratchets per wheel turn. |
scroll_lines | ScrollLines | Scroll-line behavior. |
RollerType
Roller type reported by VerticalScrolling.
| Variant | Value | Description |
|---|---|---|
Standard | 0x01 | Standard one- or two-dimensional roller. |
ThreeG | 0x03 | 3G roller. |
MicroRatchet | 0x04 | Micro-ratchet roller. |
Touchpad | 0x05 | Touchpad scrolling. |
TouchpadNaturalDefault | 0x06 | Touchpad with natural scrolling enabled by default. |
ScrollLines
Number of lines scrolled for a wheel movement.
| Variant | Value | Description |
|---|---|---|
SystemDefault | 0x00 | Do not change the host system setting. |
Lines(u8) | 0x01–0xFE | Scroll this many lines per movement. |
Page | 0xFF | Scroll a full page or screen per movement. |
Wire format
This feature has one function. The request carries a 3-byte zero payload; the response is read from the 16-byte long payload returned by the device.
get_roller_info (fn 0)
Request: [0x00, 0x00, 0x00] — no parameters; all bytes are padding zeros.
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | roller_type | RollerType discriminant (0x01, 0x03–0x06); unknown values yield Hidpp20Error::UnsupportedResponse |
| 1 | ratchets_per_turn | Raw u8 — number of physical detents per full revolution |
| 2 | scroll_lines | 0x00 → SystemDefault; 0xFF → Page; 0x01–0xFE → Lines(n) |
| 3–15 | — | Reserved / ignored |
Usage (Rust)
use hidpp::{device::Device, feature::vertical_scrolling::VerticalScrollingFeature};
// mut device: Device, already created via Device::new(channel, index)
device.enumerate_features().await?;
if let Some(feat) = device.get_feature::<VerticalScrollingFeature>() {
let info = feat.get_roller_info().await?;
println!("Roller type: {:?}", info.roller_type);
println!("Ratchets per turn: {}", info.ratchets_per_turn);
println!("Scroll lines: {:?}", info.scroll_lines);
}