If anyone is interested, I wrote an extension containing constants for all the ASCII key codes and special key codes for Glulx and the Z-machine. There’s also a function for getting the key code from a single-character string of text.
That sounds cool. There is already an extension which contains just the ASCII subset of Unicode (ASCII Character Names by Andrew Plotkin) but it’s handy to have the Z-Machine/Glulx different ones handy, and the function would be handy, too. I often have that as a debug in my projects (anytime you can press a key, it shows the keycode), but then I have to remember to remove it.