OpenLogi

0x4531 · multiPlatform

Associate each Easy-Switch host slot with an OS platform, then keep the current slot on the host OS layout.

MultiPlatform maps host slots to keyboard OS platforms. It reports platform descriptors, reads each host selection, and can persist a selected platform for a host.

Spec: Logitech HID++ 2.0 — multiPlatform (v1). Cross-checked: Logi Options+ 2.8 (static analysis), Solaar. Used by: Keyboard features.

Function reference

MultiPlatformFeature is creatable only for feature version 1.

Methods

FunctionHID++ fnSignatureReturns
get_feature_infos0()MultiPlatformInfo
get_platform_descriptor1(descriptor_index: u8)PlatformDescriptor
get_host_platform2(host: HostIndex)HostPlatform
set_host_platform3(host: HostIndex, platform_index: u8)()

Every method is async and returns Result<…, Hidpp20Error>.

Types

MultiPlatformInfo

FieldTypeDescription
capabilitiesMultiPlatformCapabilitiesFeature capabilities.
platform_countu8Number of platform IDs.
descriptor_countu8Number of descriptor rows.
host_countu8Number of host slots.
current_hostHostIndexCurrent host slot.
current_host_platformOption<u8>Current slot platform, or None for 0xff.

MultiPlatformCapabilities

The capability word is a BE u16.

FieldValueDescription
OS_DETECTION1 << 8 (0x0100)The device can detect the host OS.
SET_HOST_PLATFORM1 << 9 (0x0200)Host software can set the platform.

PlatformDescriptor

FieldTypeDescription
platform_indexu8Platform that owns this descriptor.
descriptor_indexu8Descriptor row index.
os_maskOsMaskCovered operating systems.
from_versionu8First supported OS major version.
from_revisionu8First supported OS revision.
to_versionu8Last supported OS major version.
to_revisionu8Last supported OS revision.

OsMask

OsMask is the BE u16 in descriptor bytes 2–3. OpenLogi retains unnamed bits.

FieldValueDescription
TIZEN1 << 0 (0x0001)Tizen.
WINDOWS1 << 8 (0x0100)Microsoft Windows.
WINDOWS_EMBEDDED1 << 9 (0x0200)Windows Embedded.
LINUX1 << 10 (0x0400)Linux.
CHROME1 << 11 (0x0800)ChromeOS.
ANDROID1 << 12 (0x1000)Android.
MACOS1 << 13 (0x2000)macOS.
IOS1 << 14 (0x4000)iOS.
WEBOS1 << 15 (0x8000)webOS.

HostPlatform

FieldTypeDescription
host_indexHostIndexHost slot returned by the device.
statusu8Raw host status byte.
platform_indexOption<u8>Selected platform, or None for 0xff.
sourcePlatformSourceSelection source. Unknown values return UnsupportedResponse.
auto_platform_indexOption<u8>Detected platform, or None for 0xff.
auto_descriptor_indexOption<u8>Detected descriptor, or None for 0xff.

PlatformSource

VariantValueDescription
Default0Device default.
Auto1Device-detected.
Manual2Selected on the device.
Software3Selected by host software.

HostIndex

VariantValueDescription
Current0xffThe current device-selected host.
Slot(u8)0..=0xfeA zero-based host slot index.

Events

MultiPlatformFeature has no listen() method. PlatformChange::decode decodes a raw report for the inventory event path.

FieldTypeDescription
host_indexHostIndexHost whose platform changed.
platform_indexOption<u8>New platform, or None for 0xff.
sourceOption<PlatformSource>New source, or None for an unknown value.

Wire format

Each function uses a 3-byte short request. OpenLogi normalizes each reply to 16 bytes before decoding it.

get_feature_infos (fn 0)

Request: 0x00, 0x00, 0x00.

ByteFieldNotes
0–1capabilitiesBE u16.
2platform_countNumber of platform IDs.
3descriptor_countNumber of descriptor rows.
4host_countNumber of host slots.
5current_hostHostIndex; 0xff is Current.
6current_host_platform0xff is None.
7–15—OpenLogi ignores these bytes.

get_platform_descriptor (fn 1)

Request: [descriptor_index, 0x00, 0x00].

ByteFieldNotes
0platform_indexPlatform that owns this descriptor.
1descriptor_indexDescriptor row index.
2–3os_maskBE u16.
4from_versionFirst supported OS major version.
5from_revisionFirst supported OS revision.
6to_versionLast supported OS major version.
7to_revisionLast supported OS revision.
8–15—OpenLogi ignores these bytes.

get_host_platform (fn 2)

Request: [u8::from(host), 0x00, 0x00].

ByteFieldNotes
0host_indexHostIndex returned by the device.
1statusRaw status byte.
2platform_index0xff is None.
3source0 = Default, 1 = Auto, 2 = Manual, 3 = Software.
4auto_platform_index0xff is None.
5auto_descriptor_index0xff is None.
6–15—OpenLogi ignores these bytes.

set_host_platform (fn 3)

Request: [u8::from(host), platform_index, 0x00].

OpenLogi waits for the HID++ reply but does not parse reply bytes. Call get_host_platform after this setter to confirm the persistent selection.

PlatformChange event

The public v1 specification lists this as event 0. Logi Options+ and OpenLogi's inventory path accept any unsolicited function for this feature after the feature-index and software-ID checks.

ByteFieldNotes
0host_indexHostIndex.
1platform_index0xff becomes None.
2sourceUnknown values become None.
3–15—PlatformChange::decode ignores these bytes.

How OpenLogi uses it

Since v0.8.14, the Keep OS layout setting uses this feature. The setting defaults to on when a keyboard advertises SET_HOST_PLATFORM.

OpenLogi reads feature information and requires a current numbered slot within host_count. It reads every descriptor, selects a platform that covers the host OS, and rejects indices outside platform_count.

OpenLogi reads the current slot before it writes. It writes only when the selected platform differs, then reads the slot again and reports a mismatch as an error.

The host OS is macOS, Windows, or Linux. When its version is unavailable, OpenLogi accepts only a descriptor with no upper version bound.

The inventory path recognizes a software-ID-0 platform-change report, increments settings_revision, and requests reconciliation. If Keep OS layout remains enabled, the agent rechecks and reasserts the host layout after a device-side change.

This selection is persistent. OpenLogi does not restore the previous platform at exit; turning the setting off stops future writes without reverting the current selection.

Open questions

The v1 specification identifies event 0, while Options+ accepts reports regardless of their function. OpenLogi uses the permissive Options+ rule in its inventory path.

No hardware capture establishes whether keyboards emit nonzero-function reports. OpenLogi treats any valid three-byte report as a change hint and re-reads authoritative state.

Usage (Rust)

use hidpp::{
    device::Device,
    feature::{
        hosts_info::HostIndex,
        multi_platform::{MultiPlatformCapabilities, MultiPlatformFeature},
    },
};

// `device` is a discovered HID++ device.
device.enumerate_features().await?;
if let Some(feature) = device.get_feature::<MultiPlatformFeature>() {
    let info = feature.get_feature_infos().await?;
    let host = HostIndex::Current;
    let before = feature.get_host_platform(host).await?;

    if info
        .capabilities
        .contains(MultiPlatformCapabilities::SET_HOST_PLATFORM)
    {
        // The caller must obtain this index from a compatible descriptor.
        feature.set_host_platform(host, 0).await?;
        let after = feature.get_host_platform(host).await?;
        println!("{before:?} -> {after:?}");
    }
}

On this page