While working on another project, I found that I really needed much more control over Inform’s input loops. I put together an extension to solve the problem, Glulx Input Loops. While the primary impetus for GIL was rather arcane, the final extension also allows for the game’s primary input loop to accept any type of input in place of “line input” (the standard typed text input familiar in interactive fiction). For example, if you want your game to be played entirely with hyperlinks—no typing at all—you could make that change by writing, essentially, a single line (you’d also have to include one of the numerous extensions that implement hyperlink input).
Anyway, while contemplating what kind of example code I could include with this extension, I thought about the way that Nethack has you chain together single keystroke inputs to build commands. For example, to eat something, you key in “e” for “eat”, followed by another letter for the edible inventory item you’re keen on. I wondered whether something similar might work for interactive fiction, and so I threw together a quick experiment to explore the question.
The result is a bit underimplemented—you can only enter, at most, VERB + NOUN inputs—and there quite a few issues are left hanging that any full-scale game would need to address, such as how to provide contextual lists of items, how to allow the player to refer to things outside her immediate environs, how to handle conversation, and so on. Still, it at least gives a good sense of how this kind of thing could work. You can play the example online, browse the source, or download a gblorb for use on your favorite desktop interpreter here:
Reflection: I’m not sure whether this fills any real need. A similar interface that used hyperlinks would be more practical for mobile devices, for example, and for most of us working on a full-size computer, typing a full word isn’t really a whole lot less work than hitting a single key. Comments welcome.