Skip to main content

Graphics Input

The %TRGIN bit in the right half of the SMARTS variable indicates that the terminal can supply a graphic input in the form of a cursor position on request. Sending a %GOGIN command to the terminal asks to read the cursor position. It should be followed by an argument character that will be included in the reply, and serve to associate the reply with the particular request for input that elicited it. The reply should have the form of a Top-Y character (code 4131), followed by the reply code character as just described, followed by an absolute cursor position. Since Top-Y is not normally meaningful as input, %GOGIN replies can be distinguished reliably from keyboard input. Unsolicited graphic input should be sent using a Top-X instead of a Top-Y, so that the program can distinguish them. Instead of a reply code, for which there is no need, the terminal should send an encoding of the buttons pressed by the user on his input device, if it has more than one.