https://powershell.one/tricks/input-devices/detect-key-press
Copy to Clipboard
if ([Console]::KeyAvailable)
{
# read the key, and consume it so it won't
# be echoed to the console:
$keyInfo = [Console]::ReadKey($true)
# exit loop
break
}
|