Keyboard input/Keypress check: Difference between revisions
Content added Content deleted
m (→{{header|PowerShell}}: typo) |
|||
Line 36:
=={{header|PowerShell}}==
The following uses the special <code>$Host</code> variable which points to an instance of the PowerShell host application. Since the host's capabilities may vary this may not
<lang powershell>if ($Host.UI.RawUI.KeyAvailable) {
$key = $Host.UI.RawUI.ReadKey()
|