I can’t believe I never noticed this before…
The z-machine standard says ZSCII 27 (Escape) is defined for input, but later in the remarks says:
“The extant Infocom games in Versions 4 and 5 use the control characters 1 to 31 only as follows: they all accept 10 or 13 as equivalent, except that ‘Bureaucracy’ will only accept 13. ‘Bureaucracy’ needs either 127 or 8 to be a delete code. No other codes are used.”
So, are there games which do use the escape key?
The I6 library accepts escape in the DoMenu routine, to quit the current menu.
Now I’m curious if that is a purely Inform extension to the Z-machine, or if any of Infocom’s V6 games used the key at all.
I do think it was used in V6, but I can’t point to any examples off the top of my head. If it was an Inform-only extension it would generally have a “1.0” or “1.1” note next to it.
It might well have been a feature supported by Infocom’s 8-bit interpreters even though it was never used in a game.
There are some signs in the leaked source code that it was meant to be used, but for one reason or the other wasn’t:
- The clues.zil file in zillib has
,ESCAPE-KEY commented out in a few places, but I can’t find any definition of it.
- Similarly, some versions of the hints.zil file for Arthur has a chunk of commented-out code where it checks for character code 27.
Escape is kind of an odd duck now that I think about it:
It’s the only ZSCII character defined for input but not output that isn’t considered a function key (excluding delete).
Section 10.5.2.1 of the standard says only function key codes above 128 can terminate a read instruction, implying Escape would be excluded, but Beyond Zork shows that regular printable characters were in fact used that way and the standard seems to be wrong in that respect.
So, any opinions on whether or not escape should be legal as a terminating character from a read? All legal characters are allowed from a read_char, so that instruction isn’t particularly relevant.
Bonus points: Should delete be allowed to terminate a read? I imagine most interpreters wouldn’t respect delete showing up in the terminating table, but it could be used to novel effect, maybe combining it with preloaded input text for some amusing behavior.