11// MaaFramework 类型定义
22
3+ import { loggers } from '@/utils/logger' ;
4+
35/** ADB 设备信息 */
46export interface AdbDevice {
57 name : string ;
@@ -159,6 +161,7 @@ export const Win32InputMethod = {
159161 PostMessageWithCursorPos : 1n << 6n ,
160162 SendMessageWithWindowPos : 1n << 7n ,
161163 PostMessageWithWindowPos : 1n << 8n ,
164+ Interception : 1n << 9n ,
162165} as const ;
163166
164167/** Win32 截图方法名称映射 */
@@ -184,6 +187,7 @@ export const Win32InputMethodNames: Record<string, bigint> = {
184187 PostMessageWithCursorPos : Win32InputMethod . PostMessageWithCursorPos ,
185188 SendMessageWithWindowPos : Win32InputMethod . SendMessageWithWindowPos ,
186189 PostMessageWithWindowPos : Win32InputMethod . PostMessageWithWindowPos ,
190+ Interception : Win32InputMethod . Interception ,
187191} ;
188192
189193/** macOS 截图方法 */
@@ -233,7 +237,11 @@ export function parseWin32InputMethod(name: string): number {
233237 if ( method !== undefined ) {
234238 return Number ( method ) ;
235239 }
236- // 默认使用 Seize
240+ // 默认使用 Seize;遇到非合规值时记录警告
241+ loggers . config . warn (
242+ '遇到非合规的 Win32 输入方法名称,已回退到默认值 Seize。' ,
243+ { name, fallback : 'Seize' } ,
244+ ) ;
237245 return Number ( Win32InputMethod . Seize ) ;
238246}
239247
0 commit comments