pub unsafe extern "C" fn MaaLinuxControllerCreate(
config_json: *const c_char,
) -> *mut MaaControllerExpand description
@brief Create a Linux controller for native Linux applications. @param config_json JSON config for the control unit. Required fields: - screencap_method: screencap method to use, see MaaLinuxScreencapMethod. - input_method: input method to use, see MaaLinuxInputMethod. Wlroots Required fields: - wlr_socket_path: wayland socket path (e.g., “/run/user/1000/wayland-0”). PipeWire Required fields: - pw_socket_fd: The PipeWire socket FD. - pw_node_id: The PipeWire Node ID. - pw_screen_width: The screen width in pixels. - pw_screen_height: The screen height in pixels. UInput Optional fields: - uinput_path: The uinput device node path, default is “/dev/uinput”. Optional fields: - use_win32_vk_code: If true, key codes passed to click_key / key_down / key_up are interpreted as Win32 Virtual-Key codes (VK_*) and translated to Linux evdev codes internally. If false, key codes are passed through as raw evdev codes. @return The controller handle, or nullptr on failure.
@note This controller is only available on Linux. @note UInput Requires write permission to /dev/uinput (typically via the “input” group). It is recommended to configure a udev rule: KERNEL==“uinput”, MODE=“0660”, GROUP=“input”.