Personally, I think the title is clear, if not, I’ll try to be more. Only managed solutions for Windows, for Linux does not. As you well know, the method "getchar()" reads only after keyboard key grip "Enter".
The conio.h library does not exist on Linux and ncurses or curses have to use a different command at build time, which I do not think very productive.
fscanf on stdin would do it, I suppose.