[Glk] Multiple concurrent input requests

Based on my reading of the Glk spec it should be possible to have multiple concurrent input requests in different windows. Is this correct?

Secondly, has anyone actually used such functionality? Or do you plan to in the future?

I’m asking because with the hassle of maintaining keyboard focus on the iPhone I’d love to be able to limit games to only having one keyboard input request at a time.

Yes, you should be able to have any number of windows waiting for input. Off hand I can’t think of a game that uses simultaneous line or character input in more than one window, but there probably is one out there.

What David said.

I don’t think I have a Glulx game file that tests multiple-window input. I suppose I should put one together, since variations of the idea seem to be arising in several directions.

For the iPhone setup, I assume we’re still in the model where a single HTML input field is moved around the screen. If so, I guess the answer is that if there are two windows asking for keyboard input, and the player taps one, you move the input field to that window, update its content, and (perhaps) leave a fake (non-interactive) text string behind in the other window to represent the unfinished line input.

Would character input also need to be scoped to a particular window?

Yes, it will.