0x40A3 · fnInversionMultiHost
Per-host-slot Fn-lock control — read or write the function-key inversion state independently for each paired host slot.
fnInversionForMultiHostDevices controls whether F-row keys behave as standard
function keys or as their labeled media / special-key actions by default. Unlike
the single-host predecessor 0x40A2 (fnInversionWithDefaultState), this
variant stores an independent inversion state for each host slot.
getGlobalFnInversion (function 0) reads the current state, the factory-default
state, and the device capabilities for a given HostIndex. setGlobalFnInversion
(function 1) writes the desired FnInversionState for a host slot; the device
persists the value in its own non-volatile memory and returns the resulting
FnInversionInfo.
FnInversionState—Off(F-keys behave as labeled function keys),On(F-keys behave as media / special-key actions).FnInversionCapabilities—MANUAL_FN_LOCKflag indicates the device supports manual Fn-lock control.FnInversionInfo— response struct carryinghost_index,state,default_state, andcapabilities.
Spec: Logitech HID++ 2.0 — fnInversionForMultiHostDevices. Used by: Typed wrapper in
openlogi-hidpp.
Function reference
The FnInversionMultiHostFeature wrapper (0x40a3) exposes:
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_global_fn_inversion | 0 | (host: HostIndex) | FnInversionInfo |
set_global_fn_inversion | 1 | (host: HostIndex, state: FnInversionState) | FnInversionInfo |
All methods are async and return Result<_, Hidpp20Error>.
Types
FnInversionInfo
Function-key inversion state for a host slot.
| Field | Type | Description |
|---|---|---|
host_index | HostIndex | Host slot index returned by the device. |
state | FnInversionState | Current inversion state. |
default_state | FnInversionState | Default inversion state. |
capabilities | FnInversionCapabilities | Inversion capabilities. |
FnInversionState
Function-key inversion state.
| Variant | Value | Description |
|---|---|---|
Off | 0 | Function-key inversion is disabled. |
On | 1 | Function-key inversion is enabled. |
FnInversionCapabilities
Function-key inversion capabilities (bitflags).
| Flag | Bit/Value | Description |
|---|---|---|
MANUAL_FN_LOCK | 1 << 0 | The device supports manual Fn-lock control. |
HostIndex
A host slot selector (defined in hosts_info).
| Variant | Value | Description |
|---|---|---|
Current | 0xff | The host slot currently selected by the device. |
Slot(u8) | 0–0xfe | A zero-based host slot index. |
Wire format
Requests carry a 3-byte payload; responses are parsed from the 16-byte long payload returned by extend_payload().
get_global_fn_inversion (fn 0)
Request: [host_index, 0x00, 0x00]
- Byte 0:
host_index—u8encoding ofHostIndex(0xff= current slot,0x00–0xfe= zero-based slot index) - Bytes 1–2: reserved, always
0x00
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | host_index | HostIndex returned by the device |
| 1 | state | 0 = Off, 1 = On |
| 2 | default_state | 0 = Off, 1 = On |
| 3 | capabilities | Bitflags: bit 0 = MANUAL_FN_LOCK |
| 4–15 | — | Reserved / unused |
set_global_fn_inversion (fn 1)
Request: [host_index, state, 0x00]
- Byte 0:
host_index—u8encoding ofHostIndex - Byte 1:
state—u8encoding ofFnInversionState(0=Off,1=On) - Byte 2: reserved, always
0x00
Response (byte → field): identical layout to get_global_fn_inversion — the device echoes back the resulting FnInversionInfo for the host slot.
Usage (Rust)
use hidpp::{
device::Device,
feature::fn_inversion::{FnInversionMultiHostFeature, FnInversionState},
};
// mut device: Device, already created via Device::new(channel, index)
device.enumerate_features().await?;
if let Some(feat) = device.get_feature::<FnInversionMultiHostFeature>() {
// Read the current state for the active host slot.
let info = feat.get_global_fn_inversion(hidpp::feature::hosts_info::HostIndex::Current).await?;
println!("state={:?}, default={:?}, caps={:?}", info.state, info.default_state, info.capabilities);
// Enable Fn-inversion on host slot 0.
let updated = feat
.set_global_fn_inversion(hidpp::feature::hosts_info::HostIndex::Slot(0), FnInversionState::On)
.await?;
println!("new state={:?}", updated.state);
}