Console keyboard input

I want to input key board information from a Windows 10 system via console input ( i guess stdin) using getchar() or scanf (or anything else that will work).

getchar() always returns a value of -1 (EOF or error). Console output is working perfectly.

How is it possible to do this?

Thanks,

JSW