diff --git a/Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs b/Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs index 6207e1886..94f2c5ec8 100644 --- a/Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs +++ b/Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs @@ -61,6 +61,11 @@ internal class WindowsInput : ConsoleInput, IWindowsInput protected override bool Peek () { + if (ConsoleDriver.RunningUnitTests) + { + return false; + } + const int bufferSize = 1; // We only need to check if there's at least one event nint pRecord = Marshal.AllocHGlobal (Marshal.SizeOf () * bufferSize);