Hi,
I've stumbled across something which looks like a bug to me in the library_glut.js input code, but it could also be a misunderstanding on my side resulting from the many GLUT versions floating around (GLUT, FreeGlut, OpenGlut, ...):
In this commit the backspace and delete keys had been added as special keys:
The delete key returns the special key code 111 (0x6F) and 120 (0x78).
But there are missing GLUT_KEY_xxx definitions for these in GL/freeglut_std.h , now the "official" GLUT doc states that these keys are not returned as special keys, but as ASCII code in the normal keyboard callback function:
at the end it states:
"Note that the escape, backspace, and delete keys are generated as an ASCII character."
#define GLUT_KEY_DELETE 0x006F
So long story short:
1) it looks like GLUT and FreeGLUT don't agree on how to handle the Delete key :/
2) the Delete key in FreeGLUT is only defined in the freeglut_ext.h header which we don't ship with
3) FreeGLUT doesn't define a special key code for Backspace anywhere, but library_glut.js returns it as a special key code
I see 2 possible solutions:
1) go with the GLUT standard, remove Delete and Backspace as special keys, and return them as ASCII code (I would prefer this solution, but it breaks prenaux' change)
2) add the 2 more GLUT_KEY definitions to freeglut_std.h, GLUT_KEY_DELETE (normally defined in freeglut_ext.h, but we can't include this because 99% of the stuff in there isn't implemented in library_glut.js), and GLUT_KEY_BACKSPACE, which would be totally non-standard (neither GLUT nor FreeGLUT).
Advice? :)
-Floh