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...
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...
MSVC++~
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; } }
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
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.
Last edited by DougDbug; 03-18-2003 at 04:31 PM.
>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
My best code is written with the delete key.