gmamaladze / globalmousekeyhook

This library allows you to tap keyboard and mouse, detect and record their activity even when an application is inactive and runs in background.
MIT License
1.05k stars 257 forks source link

ConsoleHook Examples throw Invalid Operation Exception on Line 'Console.ReadKey' #132

Closed chrkon closed 1 year ago

chrkon commented 3 years ago

I have tried to run the ConsoleHook Examples from the vNext Branch with VS 2019.

Both throw this Exception:

Exception has occurred: CLR/System.InvalidOperationException An unhandled exception of type 'System.InvalidOperationException' occurred in System.Console.dll: 'Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.'