I'm working on a console application where you have to enter in a username and password for a database and I was hoping to make it so when the user enters their password in, it isn't visible in the console window.

I think I can figure out how to do it but the problem is I'm not sure how to capture each and every individual key. So then if I could do that, if the key was something other than enter, it would add it to a string and then write back: \b\0\b to erase it.

So my question is, how can I capture each key?