Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from alt.ascii-art, started 22 May 1996.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
TALK: ANSI CODES

TALK: ANSI CODES

alt.ascii-art · 1 message · 22 May 1996

On Tue, 21 May 1996, pauline phi phan wrote:
> In article <4nco94$2k...@miso.wwa.com> you wrote:
> 
> > Here are the colour and the cursor movement codes.
> > If you need the key-redefinition ones as well, just mail me...
> 
> Yes, can you please post or email the key-redefinition ones please.  Also,
I've included them..
> do you know how to set or create control charaters?  Please help if you do
If this list doesn't help you, i can't...
> know how, I've been asking around and no one was able to help.  Thanks!
You're welcome!

GrntX,

Erwin Wessels
_______________________________________________________________________________
===============================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Warning Warning Warning Warning Warning Warning Warning Warning Warning Warning
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
The following text is a part from a text in my MS-DOS book, so the following
sequences are, as far as i know, only valid on MS-DOS, running ANSI.SYS .
As for other operating systems, i do not know there effects, so be carefull
using these codes!
!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!-!
Warning Warning Warning Warning Warning Warning Warning Warning Warning Warning

Parameters that can be uses in ANSI escape-sequences.
=====================================================
Pn	Numeric parameter. Specifies a decimal number.
Ps	Selective parameter. Specifies a decimal number, with which you
	select a function. You can give more function by separating the
	parameters with a semi-colon.
PL	Line-parameter. Specifies a decimal number corresponding with one
	of the lines on the screen or another device.
Pc	Column-parameter. Is used for a decimal number corresponding with
	one of the columns on the screen or another device.

ANSI escape-sequences for cursormovement and screen display
===========================================================
In the next section of ANSI escape sequences the abbreviaton ESC is used for
the ASCII escape-character 27 (1Bh) that is used at the beginning of every
escape-sequence.

ESC[=Psh	Select mode. This sequence changes the mode for the
		screenwidth or the screentype using on of the next values:
		0	40 x 25 monochrome (text)
		1	40 x 25 color (text)
		2	80 x 25 monochrome (text)
		3	80 x 25 color (text)
		4	320 x 200 four colors (graphic)
		5	320 x 200 monochrome (graphic)
		6	640 x 200 monochrome (graphic)
		7	Breaks off lines at the end
		13	320 x 200 color (graphic)
		14	640 x 200 color (graphic, 16 colours)
		15	640 x 350 monochrome (graphic, b/w)
		16	640 x 350 color (graphic, 16 colours)
		17	640 x 480 monochrome (graphic, b/w)
		18	640 x 480 color (graphic, 16 colours)
		19	320 x 200 color (graphic, 256 colours)

ESC[=Psl	Reset mode. For the resetting of the mode, the same
		parameters are valid as for the previous sequence, except
		parameter 7, withwhich the mode is selected that makes sure
		lines are not broken at the end.

ESC[code;charsequence;...p	Set keyboardsequences. Assignes a new
				charactersequence to a key on the keyboard.
		The following parameters are valid:
		* code: one or more values from the following table. These
		  values represent the keys en keycombinations of the keyboard.
		  The semi-colons in this table have to be typed. The codes
		  between brackets are not valid for certain keyboards. It
		  CAN be possible that ANSI.SYS processes some of these codes
                  only when you add the switch /x when you start ANSI.SYS.
 		* charsequence: either the ASCII-code for a single character,
		  or a charactersequence between "'s. The capital A can for
		  instance be assigned both using 65 as "A".

IMPORTANT: Some values in the following table are NOT valid for all
computers. Read the documentation from the computer for values not
conforming the following ones.

ASCII-keycodes

Key		Code	Shift+	CTRL+	ALT+
F1		0;59	0;84	0;94	0;104
F2		0;60	0;85	0;95	0;105
F3		0;61	0;86	0;96	0;106
F4		0;62	0;87	0;97	0;107
F5		0;63	0;88	0;98	0;108
F6		0;64	0;89	0;99	0;109
F7		0;65	0;90	0;100	0;110
F8		0;66	0;91	0;101	0;111
F9		0;67	0;92	0;102	0;112
F10		0;68	0;93	0;103	0;113
F11		0;133	0;135	0;137	0;139
F12		0;134	0;136	0;138	0;140
keypad:
HOME		0;71	55	0;119	-----
ARRROW-UP		0;72	56	(0;141)	-----
PGUP		0;73	57	0;132	-----
ARROW-LEFT	0;75	52	0;115	-----
5		(0;76)	53	(0;143)	-----
ARROW-RIGHT	0;77	54	0;116	-----
END		0;79	49	0;117	-----
ARROW-DOWN	0;80	50	0;145	-----
PGDN		0;81	51	0;118	-----
INS		0;82	48	(0;146)	-----
DEL		0;83	46	(0;147)	-----
ENTER		13	-----	10	(0;166)
/		47	47	(0;142)	(0;74)
*		42	(0;144)	(0;78)	-----
-		45	45	(0;149)	(0;164)
+		43	43	(0;150)	(0;55)

HOME		(224;71)	(224;71)	(224;119)	(224;151)
ARROW-UP		(224;72)	(224;72)	(224;141)	(224;152)
PGUP		(224;73)	(224;73)	(224;132)	(224;153)
ARROW-LEFT	(224;75)	(224;75)	(224;115)	(224;155)
ARROW-RIGHT	(224;77)	(224;77)	(224;116)	(224;157)
END		(224;79)	(224;79)	(224;117)	(224;159)
ARROW-DOWN	(224;80)	(224;80)	(224;145)	(224;154)
PGDN		(224;81)	(224;81)	(224;118)	(224;161)
INS		(224;82)	(224;82)	(224;146)	(224;162)
DEL		(224;83)	(224;83)	(224;147)	(224;163)
PRINT-SCREEN	-----	-----	0;114	-----
PAUSE/BREAK	-----	-----	0;0	-----
BACKSPACE		8	8	127	(0)
ENTER		13	-----	10	(0;28)
TAB		9	0;15	(0;148)	(0;165)
NUL		0;3	-----	-----	-----
A		97	65	1	0;30
B		98	66	2	0;48
C		99	67	3	0;46
D		100	68	4	0;32
E		101	69	5	0;18
F		102	70	6	0;33
G		103	71	7	0;34
H		104	72	8	0;35
I		105	73	9	0;23
J		106	74	10	0;36
K		107	75	11	0;37
L		108	76	12	0;38
M		109	77	13	0;50
N		110	78	14	0;49
O		111	79	15	0;24
P		112	80	16	0;25
Q		113	81	17	0;16
R		114	82	18	0;19
S		115	83	19	0;31
T		116	84	20	0;20
U		117	85	21	0;22
V		118	86	22	0;47
W		119	87	23	0;17
X		120	88	24	0;45
Y		121	89	25	0;21
Z		122	90	26	0;44
1		49	33	-----	0;120
2		50	64	0	0;121
3		51	35	-----	0;122
4		52	36	-----	0;123
5		53	37	-----	0;124
6		54	94	30	0;125
7		55	38	-----	0;126
8		56	42	-----	0;127
9		57	40	-----	0;128
0		48	41	-----	0;129
-		45	95	31	0;130
=		61	43	-----	0;131
[		91	123	27	0;26
]		93	125	29	0;27
\		92	124	28	0;43
;		59	58	-----	0;39
'		39	34	-----	0;40
,		44	60	-----	0;51
.		46	62	-----	0;52
/		47	63	-----	0;53
`		96	126	-----	(0;41)

Examples

With the following escape-sequence u can swap the backslash and the question
mark, using "literal"-strings:
ESC["\";"?"pESC["?";"\"p
With the following escape-sequence u can swap the backslash and the question
mark, using ASCII-values:
ESC[92;63pESC[63;92p
With this sequence you can swap them back:
ESC[92;92pESC[63;63p

About this thread. These messages were posted publicly to the newsgroup alt.ascii-art in 1996 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