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
inttype (bitwise OR combination); for ProjectInterface V2, usestringtype (use the name directly). - ProjectInterface V2 only supports configuring screencap/mouse/keyboard methods for Win32 controllers. For Adb controllers, screencap/input uses
MaaToolkitAdbDeviceFindto 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
| Name | API Value | Speed | Compatibility | Description |
|---|---|---|---|---|
| AdbShell | 1 | Slow | High | |
| MinitouchAndAdbKey | 2 | Fast | Medium | Key input still uses AdbShell |
| Maatouch | 4 | Fast | Medium | |
| EmulatorExtras | 8 | Fast | Low | Only 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.
| Name | API Value | Speed | Compatibility | Encoding | Description |
|---|---|---|---|---|---|
| EncodeToFileAndPull | 1 | Slow | High | Lossless | |
| Encode | 2 | Slow | High | Lossless | |
| RawWithGzip | 4 | Medium | High | Lossless | |
| RawByNetcat | 8 | Fast | Low | Lossless | |
| MinicapDirect | 16 | Fast | Low | Lossy | |
| MinicapStream | 32 | Very Fast | Low | Lossy | |
| EmulatorExtras | 64 | Very Fast | Low | Lossless | Only 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.
| Name | API Value | Compatibility | Requires Admin | Seizes Cursor | Background | Description |
|---|---|---|---|---|---|---|
| Seize | 1 | High | No | Yes | No | |
| SendMessage | 2 | Medium | Maybe | No | Yes | |
| PostMessage | 4 | Medium | Maybe | No | Yes | |
| LegacyEvent | 8 | Low | No | Yes | No | |
| PostThreadMessage | 16 | Low | Maybe | No | Yes | |
| SendMessageWithCursorPos | 32 | Medium | Maybe | Brief | Yes | Designed for games like Genshin Impact that detect actual mouse position |
| PostMessageWithCursorPos | 64 | Medium | Maybe | Brief | Yes | Designed 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
WithCursorPosmethods 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.
| Name | API Value | Speed | Compatibility | Requires Admin | Background | Description |
|---|---|---|---|---|---|---|
| GDI | 1 | Fast | Medium | No | No | |
| FramePool | 2 | Very Fast | Medium | No | Yes | Available on Windows 10 1903+ |
| DXGI_DesktopDup | 4 | Very Fast | Low | No | No | Desktop duplication (full-screen output copy) |
| DXGI_DesktopDup_Window | 8 | Very Fast | Low | No | No | Desktop duplication cropped to window |
| PrintWindow | 16 | Medium | Medium | No | Yes | |
| ScreenDC | 32 | Fast | High | No | No |
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.
