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
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_feature_infos | 0 | () | MultiPlatformInfo |
get_platform_descriptor | 1 | (descriptor_index: u8) | PlatformDescriptor |
get_host_platform | 2 | (host: HostIndex) | HostPlatform |
set_host_platform | 3 | (host: HostIndex, platform_index: u8) | () |
Every method is async and returns Result<…, Hidpp20Error>.
Types
MultiPlatformInfo
| Field | Type | Description |
|---|---|---|
capabilities | MultiPlatformCapabilities | Feature capabilities. |
platform_count | u8 | Number of platform IDs. |
descriptor_count | u8 | Number of descriptor rows. |
host_count | u8 | Number of host slots. |
current_host | HostIndex | Current host slot. |
current_host_platform | Option<u8> | Current slot platform, or None for 0xff. |
MultiPlatformCapabilities
The capability word is a BE u16.
| Field | Value | Description |
|---|---|---|
OS_DETECTION | 1 << 8 (0x0100) | The device can detect the host OS. |
SET_HOST_PLATFORM | 1 << 9 (0x0200) | Host software can set the platform. |
PlatformDescriptor
| Field | Type | Description |
|---|---|---|
platform_index | u8 | Platform that owns this descriptor. |
descriptor_index | u8 | Descriptor row index. |
os_mask | OsMask | Covered operating systems. |
from_version | u8 | First supported OS major version. |
from_revision | u8 | First supported OS revision. |
to_version | u8 | Last supported OS major version. |
to_revision | u8 | Last supported OS revision. |
OsMask
OsMask is the BE u16 in descriptor bytes 2–3. OpenLogi retains unnamed bits.
| Field | Value | Description |
|---|---|---|
TIZEN | 1 << 0 (0x0001) | Tizen. |
WINDOWS | 1 << 8 (0x0100) | Microsoft Windows. |
WINDOWS_EMBEDDED | 1 << 9 (0x0200) | Windows Embedded. |
LINUX | 1 << 10 (0x0400) | Linux. |
CHROME | 1 << 11 (0x0800) | ChromeOS. |
ANDROID | 1 << 12 (0x1000) | Android. |
MACOS | 1 << 13 (0x2000) | macOS. |
IOS | 1 << 14 (0x4000) | iOS. |
WEBOS | 1 << 15 (0x8000) | webOS. |
HostPlatform
| Field | Type | Description |
|---|---|---|
host_index | HostIndex | Host slot returned by the device. |
status | u8 | Raw host status byte. |
platform_index | Option<u8> | Selected platform, or None for 0xff. |
source | PlatformSource | Selection source. Unknown values return UnsupportedResponse. |
auto_platform_index | Option<u8> | Detected platform, or None for 0xff. |
auto_descriptor_index | Option<u8> | Detected descriptor, or None for 0xff. |
PlatformSource
| Variant | Value | Description |
|---|---|---|
Default | 0 | Device default. |
Auto | 1 | Device-detected. |
Manual | 2 | Selected on the device. |
Software | 3 | Selected by host software. |
HostIndex
| Variant | Value | Description |
|---|---|---|
Current | 0xff | The current device-selected host. |
Slot(u8) | 0..=0xfe | A zero-based host slot index. |
Events
MultiPlatformFeature has no listen() method. PlatformChange::decode decodes a raw report for the inventory event path.
| Field | Type | Description |
|---|---|---|
host_index | HostIndex | Host whose platform changed. |
platform_index | Option<u8> | New platform, or None for 0xff. |
source | Option<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.
| Byte | Field | Notes |
|---|---|---|
| 0–1 | capabilities | BE u16. |
| 2 | platform_count | Number of platform IDs. |
| 3 | descriptor_count | Number of descriptor rows. |
| 4 | host_count | Number of host slots. |
| 5 | current_host | HostIndex; 0xff is Current. |
| 6 | current_host_platform | 0xff is None. |
| 7–15 | — | OpenLogi ignores these bytes. |
get_platform_descriptor (fn 1)
Request: [descriptor_index, 0x00, 0x00].
| Byte | Field | Notes |
|---|---|---|
| 0 | platform_index | Platform that owns this descriptor. |
| 1 | descriptor_index | Descriptor row index. |
| 2–3 | os_mask | BE u16. |
| 4 | from_version | First supported OS major version. |
| 5 | from_revision | First supported OS revision. |
| 6 | to_version | Last supported OS major version. |
| 7 | to_revision | Last supported OS revision. |
| 8–15 | — | OpenLogi ignores these bytes. |
get_host_platform (fn 2)
Request: [u8::from(host), 0x00, 0x00].
| Byte | Field | Notes |
|---|---|---|
| 0 | host_index | HostIndex returned by the device. |
| 1 | status | Raw status byte. |
| 2 | platform_index | 0xff is None. |
| 3 | source | 0 = Default, 1 = Auto, 2 = Manual, 3 = Software. |
| 4 | auto_platform_index | 0xff is None. |
| 5 | auto_descriptor_index | 0xff 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.
| Byte | Field | Notes |
|---|---|---|
| 0 | host_index | HostIndex. |
| 1 | platform_index | 0xff becomes None. |
| 2 | source | Unknown 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:?}");
}
}