#include <conio.h>
#include <iostream>
#pragma warning(disable : 4996)
int main()
{
while (true)
std::cout << "-----\n" << getch() << "\n-----\n";
}
That's what I get If I press the space
key:
-----
32
-----
If I press the del
key for example I get this:
-----
224
-----
-----
83
-----
Why do some keys print one number and some other keys print two numbers?