ANSI 이스케이프 코드
ANSI X3.64 (ISO 6429) ncurses 기반 애플리케이션 시스템 모니터
htop 의 출력.
SGR 및 기타 ANSI/ISO 컨트롤 시퀀스를 사용한다.
표준 분류 ISO/IEC 2022 기반 컨트롤 코드 및 컨트롤 시퀀스 세트그 밖의 관련 인코딩 기타 컨트롤 기능 표준: ITU T.101, JIS X 0207, ISO 6630, DIN 31626, ETS 300 706
ANSI 이스케이프 시퀀스 (ANSI escape sequences)는 비디오 텍스트 터미널 및 터미널 에뮬레이터 에서 커서 위치, 색, 글꼴 스타일, 그 밖의 옵션을 제어하는 대역 내 신호 방식 을 위한 표준이다. 대부분 ASCII 이스케이프 문자와 괄호 문자로 시작하는 특정 바이트 시퀀스들은 텍스트에 임베디드된다. 터미널은 이 시퀀스들을 텍스트가 아닌 명령으로 해석한다.
ANSI 시퀀스는 1970년대에 벤더 특화 시퀀스를 대체하기 위해 도입되었으며 1980년대 초 컴퓨터 장비 시장에서 널리 보급되었다. 이들은 표준화된 기능을 제공할 수 있도록 전자 게시판 뿐 아니라 개발, 과학, 상업용 텍스트 기반 애플리케이션에 사용된다.
하드웨어 텍스트 터미널이 21세기에 증가하고 있음에도 ANSI 표준의 타당성은 지속되고 있는데 그 이유는 대부분의 터미널 에뮬레이터들과 명령 콘솔들이 적어도 ANSI 표준의 일부를 해석하고 있기 때문이다.
설명
제어 문자
^
C0
Abbr
Name
^G
7
BEL
Bell
^H
8
BS
Backspace
^I
9
HT
Tab
^J
0xA
LF
Line Feed
^L
0xC
FF
Form Feed
^M
0xD
CR
Carriage Return
^[
0x1B
ESC
Escape
Fe 이스케이프 시퀀스
C1
Abbr
Name
ESC N
0x8E
SS2
Single Shift Two
ESC O
0x8F
SS3
Single Shift Three
ESC P
0x90
DCS
Device Control String
ESC [
0x9B
CSI
Control Sequence Introducer
ESC \
0x9C
ST
String Terminator
ESC ]
0x9D
OSC
Operating System Command
ESC X
0x98
SOS
Start of String
ESC ^
0x9E
PM
Privacy Message
ESC _
0x9F
APC
Application Program Command
CSI (Control Sequence Introducer) 시퀀스
Abbr
Name
CSI n A
CUU
Cursor Up
CSI n B
CUD
Cursor Down
CSI n C
CUF
Cursor Forward
CSI n D
CUB
Cursor Back
CSI n E
CNL
Cursor Next Line
CSI n F
CPL
Cursor Previous Line
CSI n G
CHA
Cursor Horizontal Absolute
CSI n ; m H
CUP
Cursor Position
CSI n J
ED
Erase in Display
CSI n K
EL
Erase in Line
CSI n S
SU
Scroll Up
CSI n T
SD
Scroll Down
CSI n ; m f
HVP
Horizontal Vertical Position
CSI n m
SGR
Select Graphic Rendition
CSI 5i
AUX Port On
CSI 4i
AUX Port Off
CSI 6n
DSR
Device Status Report
비공개 시퀀스
Abbr
Name
CSI s
SCP, SCOSC
Save Current Cursor Position
CSI u
RCP, SCORC
Restore Saved Cursor Position
CSI ? 25 h
DECTCEM
CSI ? 25 l
DECTCEM
CSI ? 1049 h
CSI ? 1049 l
CSI ? 2004 h
CSI ? 2004 l
SGR (Select Graphic Rendition) 파라미터
Name
0
Reset or normal
1
Bold or increased intensity
2
Faint, decreased intensity, or dim
3
Italic
4
Underline
5
Slow blink
6
Rapid blink
7
Reverse video or invert
8
Conceal or hide
9
Crossed-out , or strike
10
Primary (default) font
11–19
Alternative font
20
Blackletter font
21
Doubly underlined; or: not bold
22
Normal intensity
23
Neither italic, nor blackletter
24
Not underlined
25
Not blinking
26
Proportional spacing
27
Not reversed
28
Reveal
29
Not crossed out
30–37
Set foreground color
38
Set foreground color
39
Default foreground color
40–47
Set background color
48
Set background color
49
Default background color
50
Disable proportional spacing
51
Framed
52
Encircled
53
Overlined
54
Neither framed nor encircled
55
Not overlined
58
Set underline color
59
Default underline color
60
Ideogram underline or right side line
61
Ideogram double underline, or double line on the right side
62
Ideogram overline or left side line
63
Ideogram double overline, or double line on the left side
64
Ideogram stress marking
65
No ideogram attributes
73
Superscript
74
Subscript
75
Neither superscript nor subscript
90–97
Set bright foreground color
100–107
Set bright background color
Fs 이스케이프 시퀀스
Abbr
Name
ESC c
RIS
Reset to Initial State
Fp 이스케이프 시퀀스
Abbr
Name
ESC 7
DECSC
DEC Save Cursor
ESC 8
DECRC
DEC Restore Cursor
nF 이스케이프 시퀀스
Abbr
Name
ESC SP F
Announce Code Structure 6
Send 7-bit C1 Control Character to the Host
ESC SP G
Announce Code Structure 7
Send 8-bit C1 Control Character to the Host
터미널 입력 시퀀스
vt sequences:
<esc>[1~ - Home <esc>[16~ - <esc>[31~ - F17
<esc>[2~ - Insert <esc>[17~ - F6 <esc>[32~ - F18
<esc>[3~ - Delete <esc>[18~ - F7 <esc>[33~ - F19
<esc>[4~ - End <esc>[19~ - F8 <esc>[34~ - F20
<esc>[5~ - PgUp <esc>[20~ - F9 <esc>[35~ -
<esc>[6~ - PgDn <esc>[21~ - F10
<esc>[7~ - Home <esc>[22~ -
<esc>[8~ - End <esc>[23~ - F11
<esc>[9~ - <esc>[24~ - F12
<esc>[10~ - F0 <esc>[25~ - F13
<esc>[11~ - F1 <esc>[26~ - F14
<esc>[12~ - F2 <esc>[27~ -
<esc>[13~ - F3 <esc>[28~ - F15
<esc>[14~ - F4 <esc>[29~ - F16
<esc>[15~ - F5 <esc>[30~ -
xterm sequences:
<esc>[A - Up <esc>[K - <esc>[U -
<esc>[B - Down <esc>[L - <esc>[V -
<esc>[C - Right <esc>[M - <esc>[W -
<esc>[D - Left <esc>[N - <esc>[X -
<esc>[E - <esc>[O - <esc>[Y -
<esc>[F - End <esc>[1P - F1 <esc>[Z -
<esc>[G - Keypad 5 <esc>[1Q - F2
<esc>[H - Home <esc>[1R - F3
<esc>[I - <esc>[1S - F4
<esc>[J - <esc>[T -
초기 전기통신 ISO/IEC 8859 서지적 이용 국가 표준 EUC ISO/IEC 2022 MacOS 코드 페이지 ("스크립트") 도스 코드 페이지 IBM AIX 코드 페이지 IBM 애플 매킨토시 에뮬레이터 IBM 어도비 에뮬레이션 IBM DEC 에뮬레이션
1020
1021
1023
1090
1100
1101
1102
1103
1104
1105
1106
1107
1287
1288
IBM HP 에뮬레이션
1050
1051
1052
1053
1054
1055
1056
1057
1058
윈도우 코드 페이지 EBCDIC 코드 페이지플랫폼 특화
아콘
어도비 표준
ATASCII
아타리 ST
BICS
카시오 계산기
CDC
CPC
DEC Radix-50
DEC MCS /NRCS
DG 인터내셔널
ELWRO-Junior
FIELDATA
GEM
GEOS
GSM 03.38
HP Roman 확장
HP Roman-8
HP Roman-9
HP 계산기
LICS
LMBCS
NEC APC
NeXT
PETSCII
샤프 계산기
TI 계산기
벤투라 인터내셔널
벤투라 심벌
WISCII
XCCS
ZX80
ZX81
ZX 스펙트럼
유니코드 / ISO/IEC 10646 기타 코드 페이지 관련 주제
1 ~ 9999 10000 ~ 19999 20000+ 같이 보기: "ISO"로 시작하는 전체 문서