0x40a0 · fnInversion
Legacy global Fn-key inversion — read or write the live state without a default-state or host-slot field.
0x40a0 is the oldest Fn-inversion feature. It controls whether bare F-row keys
send F1–F12 or their printed media and shortcut functions on keyboards that
report it. It has one global state, no default-state field, and no host selector.
Spec: No public Logitech specification. Layout reverse-engineered from Logi Options+ 2.8 (static analysis). Cross-checked: Solaar. Used by: Keyboard.
Function reference
FnInversionFeature implements feature 0x40a0 from feature version 0.
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_global_fn_inversion | 0 | () | FnInversionState |
set_global_fn_inversion | 1 | (state: FnInversionState) | () |
Both methods are async and return Result<…, Hidpp20Error>.
Types
FnInversionState
The non-exhaustive state enum has these defined values:
| Variant | Value | Description |
|---|---|---|
Off | 0 | Bare F-row keys send F1–F12. |
On | 1 | Bare F-row keys perform their printed media or shortcut function. |
Events
The wrapper exposes no typed event or broadcast-recognition helper for 0x40a0.
Wire format
All request payloads contain three bytes. No multi-byte field occurs in this feature.
get_global_fn_inversion (fn 0)
Request payload: [0x00, 0x00, 0x00].
| Byte | Bits | Field | Notes |
|---|---|---|---|
| 0 | 0–3 | state | 0 = Off; 1 = On. Options+ 2.8 |
| 0 | 4–7 | / | Available evidence does not assign these bits. OpenLogi ignores them. |
| 1–15 | / | / | Available evidence defines no fields. OpenLogi ignores these bytes. |
OpenLogi accepts either HID++ response size for this getter. It masks byte 0
with 0x0f and rejects any resulting value except 0 or 1.
set_global_fn_inversion (fn 1)
| Byte | Value | Notes |
|---|---|---|
| 0 | u8::from(state) | 0 = Off; 1 = On. Options+ 2.8 |
| 1–2 | 0x00 | OpenLogi writes fixed zero padding. |
The reply is an acknowledgement. OpenLogi does not decode any reply field from this function. Callers that need the stored state must read it again.
How OpenLogi uses it
OpenLogi advertises Fn-lock capability when a device reports 0x40a0, 0x40a2,
or 0x40a3. It opens 0x40a3, then 0x40a2, then 0x40a0. It falls back only
when the newer feature is unsupported.
The device layer maps fn_lock = true to inversion Off. This makes bare keys
send F1–F12. It maps fn_lock = false to inversion On, which selects printed
functions. The write is not read-modify-write because the request carries one
complete state value.
The legacy setter returns no state. OpenLogi reads the value after every legacy
write and rejects a mismatched result. Since v0.8.14, PR #1792 supports this fallback and reports default_fn_lock as None.
OpenLogi has no legacy state-change broadcast path. It replays a configured
fn_lock value after reconnect, and it does not restore a prior value at session
exit.
Open questions
- No hardware capture verifies the high nibble of byte 0, the remaining reply bytes, or the setter acknowledgement. Options+ 2.8 masks the low nibble. OpenLogi ignores the high nibble and rejects unknown low-nibble values.
- No available evidence establishes a default state or a device-side state-change
broadcast for
0x40a0. OpenLogi exposes no default for this variant and returns no event.
Usage (Rust)
use hidpp::{
device::Device,
feature::fn_inversion::{FnInversionFeature, FnInversionState},
};
async fn inspect(device: &mut Device) -> Result<(), hidpp::protocol::v20::Hidpp20Error> {
let _ = device.enumerate_features().await?;
let Some(feature) = device.get_feature::<FnInversionFeature>() else {
return Ok(());
};
let state = feature.get_global_fn_inversion().await?;
println!("current inversion: {state:?}");
feature
.set_global_fn_inversion(FnInversionState::Off)
.await?;
Ok(())
}