diff --git a/resources/desktop-picker.ps1 b/resources/desktop-picker.ps1 index 7046c2e..cc87d57 100644 --- a/resources/desktop-picker.ps1 +++ b/resources/desktop-picker.ps1 @@ -94,10 +94,10 @@ $prevPgDn = $false Write-PickLog "loop start" while ($true) { try { - $space = ([RpaPick.PickW32]::GetAsyncKeyState(32) -band 0x8000) -ne 0 - $esc = ([RpaPick.PickW32]::GetAsyncKeyState(27) -band 0x8000) -ne 0 - $pgUp = ([RpaPick.PickW32]::GetAsyncKeyState(33) -band 0x8000) -ne 0 - $pgDn = ([RpaPick.PickW32]::GetAsyncKeyState(34) -band 0x8000) -ne 0 + $space = (([RpaPick.PickW32]::GetAsyncKeyState(32) -band 0x8001) -ne 0) + $esc = (([RpaPick.PickW32]::GetAsyncKeyState(27) -band 0x8001) -ne 0) + $pgUp = (([RpaPick.PickW32]::GetAsyncKeyState(33) -band 0x8001) -ne 0) + $pgDn = (([RpaPick.PickW32]::GetAsyncKeyState(34) -band 0x8001) -ne 0) if ($esc) { Write-PickLog "esc"; break } if ($stage -eq "hover") { $ptX = [System.Windows.Forms.Cursor]::Position.X