I am attempting to use the DEL key inside a glut app. EVERY other key works for me, exept the DEL key. It isnt part of the specialfunc, and it should be returned by ascii 83. Is this a bug? Or am i using the wrong scan code??
Originally posted by LostInTheWoods:
I am attempting to use the DEL key inside a glut app. EVERY other key works for me, exept the DEL key. It isnt part of the specialfunc, and it should be returned by ascii 83. Is this a bug? Or am i using the wrong scan code??
Uh, I think it’s ASCII 127 (read up on your ASCII tables). ASCII 83 (decimal) is “S”.
Hello LostInTheWoods,
Try using ascii key #127. Example:
void keyboard( unsigned char key, int x, int y ) {
switch ( key ) {
case 127:
exit( 0 );
break;
}
}
glutKeyboardFunc( keyboard );
Edit: ASCII Table
- VC6-OGL
[This message has been edited by VC6-OGL (edited 01-13-2003).]