Skip to content

Control Methods

This document provides detailed explanations of the various Screencap (screenshot) and Input (control) methods in MaaFramework and their configurations.

TIP

  • For APIs, screencap/input uses int type (bitwise OR combination); for ProjectInterface V2, use string type (use the name directly).
  • ProjectInterface V2 only supports configuring screencap/mouse/keyboard methods for Win32 controllers. For Adb controllers, screencap/input uses MaaToolkitAdbDeviceFind to automatically detect and select the optimal method, no manual configuration required.

Adb

Adb Input

Reference: MaaDef.h

Combine the selected methods below using bitwise OR to provide a single value. MaaFramework will try all provided methods in a fixed priority order and select the first available method.

By default, all methods except EmulatorExtras are attempted.

Priority: EmulatorExtras > Maatouch > MinitouchAndAdbKey > AdbShell

NameAPI ValueSpeedCompatibilityDescription
AdbShell1SlowHigh
MinitouchAndAdbKey2FastMediumKey input still uses AdbShell
Maatouch4FastMedium
EmulatorExtras8FastLowOnly supports emulators: MuMu 12

Adb Screencap

Reference: MaaDef.h

Combine the selected methods below using bitwise OR to provide a single value. MaaFramework will try all provided methods and select the fastest available method.

By default, all methods except RawByNetcat, MinicapDirect, and MinicapStream are attempted.

MinicapDirect and MinicapStream encode to jpg (lossy compression), which significantly reduces template matching effectiveness and are not recommended.

NameAPI ValueSpeedCompatibilityEncodingDescription
EncodeToFileAndPull1SlowHighLossless
Encode2SlowHighLossless
RawWithGzip4MediumHighLossless
RawByNetcat8FastLowLossless
MinicapDirect16FastLowLossy
MinicapStream32Very FastLowLossy
EmulatorExtras64Very FastLowLosslessOnly supports emulators: MuMu 12, LDPlayer 9

Win32

Win32 Input

Reference: MaaDef.h

Select one of the values below.

No default value. Client can choose one as the default.

Different programs on Win32 handle input differently, so there is no universal method.

NameAPI ValueCompatibilityRequires AdminSeizes CursorBackgroundDescription
Seize1HighNoYesNo
SendMessage2MediumMaybeNoYes
PostMessage4MediumMaybeNoYes
LegacyEvent8LowNoYesNo
PostThreadMessage16LowMaybeNoYes
SendMessageWithCursorPos32MediumMaybeBriefYesDesigned for games like Genshin Impact that detect actual mouse position
PostMessageWithCursorPos64MediumMaybeBriefYesDesigned for games like Genshin Impact that detect actual mouse position

NOTE

  • Admin privileges mainly depend on the target program's permission level. If the target program runs as administrator, running with admin privileges is required for compatibility.
  • The WithCursorPos methods briefly move the cursor to the target position, then restore it after sending the message, hence "Brief" cursor seizure, but it does not block user operations.

Win32 Screencap

Reference: MaaDef.h

Select one of the values below.

No default value. Client can choose one as the default.

Different programs on Win32 handle rendering differently, so there is no universal method.

NameAPI ValueSpeedCompatibilityRequires AdminBackgroundDescription
GDI1FastMediumNoNo
FramePool2Very FastMediumNoYesAvailable on Windows 10 1903+
DXGI_DesktopDup4Very FastLowNoNoDesktop duplication (full-screen output copy)
DXGI_DesktopDup_Window8Very FastLowNoNoDesktop duplication cropped to window
PrintWindow16MediumMediumNoYes
ScreenDC32FastHighNoNo

NOTE

Windows stops rendering window content when the window is minimized. All screenshot methods cannot capture valid content from minimized windows, so please avoid minimizing the window.