Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Turning cursor off
Could someone please tell me how to turn the cursor off in a C programme for
Unix.
Regards, Kenneth.

Report this thread to moderator Post Follow-up to this message
Old Post
k.miles631@btinternet.com
03-26-08 12:25 AM


Re: Turning cursor off
On Mar 25, 9:29 am, k.miles...@btinternet.com wrote:
> Could someone please tell me how to turn the cursor off in a C programme f
or
> Unix.
> Regards, Kenneth.


you need to printf the control sequence:

^[[?25l

or "h" instead of "l" to switch it back on.

^[ stands for escape.

A more complete list is here: http://www.xfree86.org/current/ctlseqs.html

-Ed
--
(You can't go wrong with psycho-rats.)(http://mi.eng.cam.ac.uk/~er258)

/d{def}def/f{/Times s selectfont}d/s{11}d/r{roll}d f 2/m{moveto}d -1
r 230 350 m 0 1 179{ 1 index show 88 rotate 4 mul 0 rmoveto}for/s 12
d f pop 235 420 translate 0 0 moveto 1 2 scale show showpage

Report this thread to moderator Post Follow-up to this message
Old Post
Edward Rosten
03-26-08 12:25 AM


Re: Turning cursor off
Edward Rosten wrote:

> On Mar 25, 9:29 am, k.miles...@btinternet.com wrote: 
>
>
> you need to printf the control sequence:
>
> ^[[?25l
>
> or "h" instead of "l" to switch it back on.
>
> ^[ stands for escape.
>
> A more complete list is here: http://www.xfree86.org/current/ctlseqs.html
>
> -Ed
> --
> (You can't go wrong with psycho-rats.)(http://mi.eng.cam.ac.uk/~er258)
>
> /d{def}def/f{/Times s selectfont}d/s{11}d/r{roll}d f 2/m{moveto}d -1
> r 230 350 m 0 1 179{ 1 index show 88 rotate 4 mul 0 rmoveto}for/s 12
>     d f pop 235 420 translate 0 0 moveto 1 2 scale show showpage

Thank you for your quick reply, I have been searching all day for the answer
to this.
Regards, Kenneth.

Report this thread to moderator Post Follow-up to this message
Old Post
k.miles631@btinternet.com
03-26-08 12:25 AM


Re: Turning cursor off
>Could someone please tell me how to turn the cursor off in a C programme for
>Unix.
>Regards, Kenneth.

There is no one character sequence to do this.  All the world is
not a vt100-compatible terminal or terminal emulator.  There are
reasons for variables like $TERM, and packages like termcap, terminfo,
and curses.

Some terminals do not have a cursor to turn off (printing terminals
with no CRT tend to do this).  Some terminal emulations are just
stupid (I think the MS-DOS console without ANSI.SYS leaves out a
lot of stuff.  And yes, you can telnet from MS-DOS to UNIX with
appropriate drivers and network hardware.)


Report this thread to moderator Post Follow-up to this message
Old Post
Gordon Burditt
03-26-08 12:25 AM


Re: Turning cursor off
Gordon Burditt <gordonb.vqyzd@burditt.org> wrote: 

> There is no one character sequence to do this.  All the world is
> not a vt100-compatible terminal or terminal emulator.  There are
> reasons for variables like $TERM, and packages like termcap, terminfo,
> and curses.

> Some terminals do not have a cursor to turn off (printing terminals
> with no CRT tend to do this).  Some terminal emulations are just
> stupid (I think the MS-DOS console without ANSI.SYS leaves out a
> lot of stuff.  And yes, you can telnet from MS-DOS to UNIX with
> appropriate drivers and network hardware.)

fwiw, VT100's cannot turn the cursor off.

In the line of DEC terminals, that feature was added several years later in
the VT300 series (noting that most of the terminals which provide this
feature do not emulate a VT300, either ;-)

The VT300 sequence in turn is not an ANSI sequence
(it's a DEC private mode setting).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Report this thread to moderator Post Follow-up to this message
Old Post
Thomas Dickey
03-28-08 12:28 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Unix Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 02:05 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.