Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from alt.ascii-art.animation, started 8 Apr 1994.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
How To: the ESC codes [Beginners Level]

How To: the ESC codes [Beginners Level]

alt.ascii-art.animation · 5 messages · 8 Apr 1994 - 11 Apr 1994


Question: How do I change the text on the screen to be reversed, 
	  flashing, etc?

    This is done with [7mescape[m sequences!  An [7mescape[m sequence is a
sequence of characters, beginning with chr(27), the [7mescape[m character,
which is interpreted by the terminal to manipulate the output in
varius ways.  

    How does one create an [7mescape[m sequence?  The easiest way to create
these [7mescape[m sequences is through EDT.  To generate the <esc>
character in EDT, simply hit the [7mescape[m key "<esc>" twice.  This will
put a "<esc>" on the screen.  "<esc>" is EDT's way of representing the
[7mescape[m character. 

    EMACS is slightly different than EDT. To generate the <esc>
character in EMACS, hit control-shift-|-esc followed by an [7mescape[m
sequence.

    Some of the basic [7mescape[m sequences on the vt's and the ibm vt
emulator (kermit) are:

DESCRIPTION			[7mESCAPE[m SEQUENCE

normal text (resets text)         <esc>[0m
[1m Highlighted text[0m           <esc>[1m
[4m Underlined text[0m            <esc>[4m
[5m Flashing text [0m             <esc>[5m
[7m Reversed text [0m             <esc>[7m
#3 double size text
#4 double size text
                            	<esc>#3 and <esc>#4- both must be written
#6 double width text       	<esc>#6

 Fill screen with E's       	<esc>#8 
 Screen Blank               	<esc>[2J
 erases from cursor to
   end of line              	<esc>[K
 sets for 80 column mode    	<esc>[?3h
 sets for 132 column mode   	<esc>[?3L
 turns smooth scroll on     	<esc>[?4h
 turns smooth scroll off    	<esc>[?4l
 turns reverse video on    	<esc>[?5h
 turns reverse video off   	<esc>[?5l
 cursor home                	<esc>[?6h

 move cursor up x lines     <esc>[xA         x defaults to 1
 move cursor down x lines   <esc>[xB         x defaults to 1
 move cursor right y spaces <esc>[yC         y defaults to 1
 move cursor left y spaces  <esc>[yD         y defaults to 1
 cursor position            <esc>[y;xf       1<=y<=24   1<=x<=80
 cursor position            <esc>[y;xH       1<=y<=24   1<=x<=80

 sets scrolling between 
   A and B                  <esc>[A,Br
 toggle to graphics mode    <esc>(0
 toggle from graphics mode  <esc>(B

 
Susan



--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Susan Loggiodice  sst...@nox.cs.du.edu olo...@dino.conicit.ve % %
% %    * VRAINN *     finger slo...@santafe.edu  |   TEAM OS/2     % %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

In article <199...@mnemosyne.cs.du.edu> sst...@nyx10.cs.du.edu (Susan Loggiodice) writes:
       EMACS is slightly different than EDT. To generate the <esc>
   character in EMACS, hit control-shift-|-esc followed by an [7mescape[m
   sequence.

In the EMACS here one can type control-Q Escape (where escape is your
escape key), to insert escapes.  They are shown as ^[ in the text.

--
Paul E. Black			Laboratory for Applied Logic
bla...@lal.cs.byu.edu		3308 TMCB
p.b...@ieee.org		Brigham Young University
voice: +1 801 378 8113		Provo, Utah   84602
<A href="http://lal.cs.byu.edu/people/black.html">Mosaic page</A>

Paul E. Black <bla...@puma.lal.cs.byu.edu> wrote:
>In the EMACS here one can type control-Q Escape (where escape is your
>escape key), to insert escapes.  They are shown as ^[ in the text.

Can someone tell me how to insert a ^L using EMACS?

Dave Ring

In article <BLA...@puma.lal.cs.byu.edu> 
Paul E. Black, bla...@puma.lal.cs.byu.edu writes:
>        EMACS is slightly different than EDT. To generate the <esc>
>    character in EMACS, hit control-shift-|-esc followed by an [7mescape[m
Does this work for anyone?  It's supposed to make `escape'      ^^^      ^^
reversed, but I'm pretty sure that news servers strip escape codes.
>    sequence.
> 
> In the EMACS here one can type control-Q Escape (where escape is your
> escape key), to insert escapes.  They are shown as ^[ in the text.

The last time Susan posted this guide, there was a discussion of escape codes
in Emacs.  Remember...
1) Emacs is HIGHLY customizable
2) There are different flavors of Emacs

How to insert the escape character (<esc> is the escape key on the keyboard).

Gnu Emacs    C-Q <esc>
vi           ^V ^[
UNIX shell   echo , | tr , "\033"       e.g. echo ,\(B,[0m | tr , "\033"
DOS EDIT     ^P <esc>
Macintosh    I'll ask again...any Mac users know?

Or you can make a shell script or batch file that echos the escape character.
--
Matt Messina                  Vote YES on rec.arts.ascii
mat...@umich.edu        CFV: coming soon to a n.a.newgroups near you

In article <2o6f7p$t2...@tamuts.tamu.edu> dwr...@tamuts.tamu.edu (David Wayne Ring) writes:
   Can someone tell me how to insert a ^L using EMACS?

In EMACS one can insert *any* character by typing control-Q character.
So for ^L, type ^Q ^L.

--
Paul E. Black			Laboratory for Applied Logic
bla...@lal.cs.byu.edu		3308 TMCB
p.b...@ieee.org		Brigham Young University
voice: +1 801 378 8113		Provo, Utah   84602
<A href="http://lal.cs.byu.edu/people/black.html">Mosaic page</A>

About this thread. These messages were posted publicly to the newsgroup alt.ascii-art.animation in 1994 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post