Table of Contents

Method SetOption_BackgroundManagedKeys

Namespace
MaaFramework.Binding
Assembly
MaaFramework.Binding.dll

SetOption_BackgroundManagedKeys(IMaaOption<ControllerOption>?, IEnumerable<int>)

Configure background managed key domain for Win32 controllers.

public static bool SetOption_BackgroundManagedKeys(this IMaaOption<ControllerOption>? opt, IEnumerable<int> value)

Parameters

opt IMaaOption<ControllerOption>?

The option.

value IEnumerable<int>

The value.

Returns

bool

true if the option was set successfully; otherwise, false.

Remarks

Must be set before connection. After setting, matching ClickKey / LongPressKey / KeyDown / KeyUp
operations automatically route through the background guardian path.

Only supported by Win32 controllers; other controllers will fail.

value: int32_t array of virtual key codes; val_size: sizeof(int32_t) * count

Exceptions

ArgumentNullException
NotSupportedException

The opt or value is not supported.