feat(diagnostic): 完成阶段 0B 原生键盘隔离消费探测
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateSet('MicrosoftPinyin', 'Sogou')]
|
||||
[string]$ImeName,
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateSet('ObserveAndForward', 'ObserveAndConsume')]
|
||||
[string]$Action,
|
||||
[ValidateSet('WM_KEYDOWN', 'WM_KEYUP', 'WM_SYSKEYDOWN', 'WM_SYSKEYUP')]
|
||||
[string]$Message = 'WM_KEYDOWN',
|
||||
[ValidateRange(1, 255)]
|
||||
[int]$VirtualKey = 229,
|
||||
[ValidateRange(-1, 255)]
|
||||
[int]$ScanCode = 1,
|
||||
[string]$OperatorKeyLabel = 'Escape',
|
||||
[ValidateSet('IdleOnly', 'ComposingOnly')]
|
||||
[string]$ImeCondition = 'ComposingOnly',
|
||||
[ValidateSet('none', 'ime_condition_not_met')]
|
||||
[string]$ExpectedFailOpenReason = 'none',
|
||||
[string]$BaselineSet,
|
||||
[switch]$ConfirmImeIdentity
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$runner = Join-Path $PSScriptRoot 'run-input-consume-probe.ps1'
|
||||
$arguments = @{
|
||||
Action = $Action
|
||||
Message = $Message
|
||||
VirtualKey = $VirtualKey
|
||||
ScanCode = $ScanCode
|
||||
OperatorKeyLabel = $OperatorKeyLabel
|
||||
InputSource = 'Manual'
|
||||
ImeCondition = $ImeCondition
|
||||
ImeName = $ImeName
|
||||
ConfirmImeIdentity = [bool]$ConfirmImeIdentity
|
||||
ExpectedFailOpenReason = $ExpectedFailOpenReason
|
||||
}
|
||||
if ($BaselineSet) {
|
||||
$arguments.BaselineSet = $BaselineSet
|
||||
}
|
||||
|
||||
& $runner @arguments
|
||||
Reference in New Issue
Block a user