Article View: comp.terminals
Article #3How to listen to my terminal?!
From: Tim Morris
Date: Tue, 27 Oct 1992 14:04
Date: Tue, 27 Oct 1992 14:04
27 lines
1308 bytes
1308 bytes
Hi all,
I'm a bit of a newbie when it comes to VT100 programming and I'm
having a few problems which someone might be able to help me out with.
What I want to do is interrogate the terminal to find the position of the
cursor. I do this by sending:
ESC [ 6 n
And the terminal responds with (for example):
ESC [ 1 ; 1 2 R
This means the cursor is on line 1, column 12. No problemo. But what
happens if the guy using the terminal is holding down the "1" key?
I get from the terminal:
ESC 1 [ 1 1 ; 1 2 1 R
- - -
As you can see, the "1"'s from the user (printed here with a dash under
them) are getting mixed into the terminal's response to my command, and
I decode that to line 11, row 121! So how am I supposed to seperate
what the user types with the terminal's response? Is there a better
way of doing this? Help!
Thanks in advance,
Tim Morris.
Technical Details
Message-ID:
<u895174.720194664@bruny>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!rpi!batcomputer!munnari.oz.au!newsroom.utas.edu.au!bruny.cc.utas.edu.au!u895174Show Full Headers
Complete Article Headers
Newsgroups: comp.terminals Path: arc1-ca.pugleaf.net!sparky!uunet!usc!rpi!batcomputer!munnari.oz.au!newsroom.utas.edu.au!bruny.cc.utas.edu.au!u895174 From: u895174@bruny.cc.utas.edu.au (Tim Morris) Subject: How to listen to my terminal?! Message-ID: <u895174.720194664@bruny> Sender: news@newsroom.utas.edu.au Organization: University of Tasmania, Australia. Date: Tue, 27 Oct 1992 14:04:24 GMT Lines: 28