I want to see which key is pressed by user.
I know there is cin()
or getline(cin, var)
but I don't want an input, I want to get the number of the key(index, or code it is called?).
For instance, I want to get if the user has pressed F1
or F10
or Enter or Escape and then in return do something proper.
For instance:
if(user_has_pressed_escape)
{
exit_the_console();
}