Oh, that’s a very good point, js.
Mirko, worth mentioning a little more succinctly, I think – you’re trying to declare a variable at the start of your function. PS doesn’t declare variables like you may be used to from some languages like C# or VB.NET
At the beginning of your function, as js mentions, the value of the variable is $null, because it hasn’t been set yet. PowerShell will read that as [string]$null, which is an empty string. This causes an empty string to be added to the output, which is producing the extra blank line, not the keypress from Read-Host.
If you simply specify a value or a variable on a line with no assignment statement like that, PS’s default assumption is that you want to output the value and happily does that. Unlike C# where you must use a return keyword, any value expression left on a line will also be added to the output stream. PS permits functions to return multiple distinct values.