PowerShell, 111 bytes
#PowerShell, 111 bytes ThereThere is probably a better way to do this, but I can't see it at the moment.
while(($x=($x+$host.UI.RawUI.ReadKey("IncludeKeyDown").character+" ").substring(1,5)).CompareTo("hello")){}
This reads the key strokes without supressing the echo. The character is added to $x which is trimmed to the last 5 characters and compared to "hello". This carries on until the comparison is true.
Note: this does not work in the PowerShell ISE. ReadKey is disabled in that environment.
#PowerShell, 111 bytes There is probably a better way to do this, but I can't see it at the moment.
while(($x=($x+$host.UI.RawUI.ReadKey("IncludeKeyDown").character+" ").substring(1,5)).CompareTo("hello")){}
This reads the key strokes without supressing the echo. The character is added to $x which is trimmed to the last 5 characters and compared to "hello". This carries on until the comparison is true.
Note: this does not work in the PowerShell ISE. ReadKey is disabled in that environment.
PowerShell, 111 bytes
There is probably a better way to do this, but I can't see it at the moment.
while(($x=($x+$host.UI.RawUI.ReadKey("IncludeKeyDown").character+" ").substring(1,5)).CompareTo("hello")){}
This reads the key strokes without supressing the echo. The character is added to $x which is trimmed to the last 5 characters and compared to "hello". This carries on until the comparison is true.
Note: this does not work in the PowerShell ISE. ReadKey is disabled in that environment.
#PowerShell, 111 bytes There is probably a better way to do this, but I can't see it at the moment.
while(($x=($x+$host.UI.RawUI.ReadKey("IncludeKeyDown").character+" ").substring(1,5)).CompareTo("hello")){}
This reads the key strokes without supressing the echo. The character is added to $x which is trimmed to the last 5 characters and compared to "hello". This carries on until the comparison is true.
Note: this does not work in the PowerShell ISE. ReadKey is disabled in that environment.