SUMMARY: cursor addressing

From: Andy Stefancik 234-3049 (ajs6143@eerpf001.boeing.com)
Date: Mon Oct 07 1991 - 13:53:35 CDT


Many thanks to

Tim Pointing, tim@ben.dciem.dnd.ca
auspex!guy@uunet.UU.NET (Guy Harris)
Matthew Donaldson <matthew@cs.adelaide.edu.au>

You've removed the vagueness.

I should explain that control-V is how I enter escape sequences in
shell scripts using vi. i.e.
control-V esc [7m will bold the following characters.

--------------------------------------------

from Tim Pointing, tim@ben.dciem.dnd.ca

You can't do proper cursor addressing in a cmdtool (while it is in scrolling
mode, anyway). Look for the termcap entry in /etc/termcap for either
"sun" or "sun-cmd". You can use the "ts" and "te" to disable scrolling
in your cmdtool and then re-enable it. Check either termcap(5) and
console(4) for escape sequences to other fun things.

----------------------------------------------------
>From auspex!guy@uunet.UU.NET (Guy Harris)

I assume you mean "in a shelltool window, or in a 'cmdtool' window in
'full-screen' mode".

Actually, the caret is the cursor in a "cmdtool" window *not* in
full-screen mode, not the rectangular thingie.

Umm, well, you don't mean "echo a <control U>", you mean "send out
something that has the same effect on the display as typing a control-U
would". Control-U, when sent to a "shelltool" doesn't move the cursor
or erase anything; the ANSI X3.64 standard escape sequences for moving
the cursor and erasing to beginning of line should do that.

Control-V doesn't do much of anything interesting when sent to a
"shelltool" window, either; what were you trying to use control-V for?

Then you haven't looked hard enough; the following appears in the SunOS
4.0.3 TPUT(1V) manual page:

     tput cup 23 4 Send the sequence to move the cursor to
                         row 23, column 4.
 
Read CONSOLE(4S); a "shelltool" mainly emulates a Sun console (although
not all the more obscure console escape sequences work in a "shelltool",
and a "shelltool" supports, as of SunOS 4.0, more video enhancements
than a Sun console does).
 
----------------------------------
from Matthew Donaldson <matthew@cs.adelaide.edu.au>
 
Do you mean a sun-cmd window or some such? From the termcap entry, it looks
as if it's the same as for ansi terminals -
 
esc [ <row> ; <col> H
 
(e.g. esc[1;1H for top-left)
 
 
If you want to use tput, the move-cursor capability is called "cup", so
 
tput cup <row> <col> can be used, where row and col start from 0.
 
 
Hope this helps.
 
----------------------------------------
My original question
 
>Does anyone know how to do cursor addressing in a sunview
>window? By cursor I mean the little square thing in the
>window, not the mouse cursor. I believe sunview refers to
>it as a caret.
> More specifically we'd like to echo a <control U> from
>a script, to move the cursor and erase to the beginning of the line.
>The <control V control character> doesn't work with this one.
>i I can't seem to find any cursor addressing for tput,
>or escape sequences to do this.
> Any C information would be ok.
>Thanks,

Andy Stefancik Internet: as6143@eerpf001.ca.boeing.com
Boeing Commercial Airplane G. UUCP: ...!uunet!bcstec!eerpf001!as6143
P.O. Box 3707 MS 64-25 Phone: (206) 234-3049
Seattle, WA 98124-2207



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:18 CDT