what are the codes for the different keys on the board? or where could I find a list...
oh and when I say codes I mean this type...
0x38
0x1c
Thanks in advance...
Printable View
what are the codes for the different keys on the board? or where could I find a list...
oh and when I say codes I mean this type...
0x38
0x1c
Thanks in advance...
Make a program that prints the ascii value of the key you press.
May be something like this (depends on your compiler):
Code:while(something)
{
if(kbhit())
{
cout << (int)getch() << endl;
}
}
Here's a link to an ASCII table: www.asciitable.com . You'll have to search a bit more to find the actual "key scan codes" i.e. If you want to know what the code for the num-lock is.
>what are the codes for the different keys on the board? or where could I find a list...
In a few days you can check the FAQ for a way to do it. Or you could search the boards, I'm sure the topic has come up. But since I'm nice, here is a (not really portable) function that you can use to test the codes with:
Just replace getch with your system's equivalent. :)Code:int get_code ( void )
{
int ch = getch();
if ( ch == 0 || ch == 224 )
ch = 256 + getch();
return ch;
}
-Prelude