Man page - console_codes(4)
Packages contains this manual
- shm_overview(7)
- nss(5)
- proc_mtrr(5)
- intro(7)
- tcp(7)
- iso_8859-9(7)
- armscii-8(7)
- proc_kpagecount(5)
- initrd(4)
- mouse(4)
- proc_stat(5)
- x25(7)
- proc_interrupts(5)
- fifo(7)
- repertoiremap(5)
- icmp(7)
- futex(7)
- feature_test_macros(7)
- lp(4)
- bpf-helpers(7)
- epoll(7)
- proc_sys_dev(5)
- namespaces(7)
- proc_sysrq-trigger(5)
- proc_bus(5)
- cp1251(7)
- proc_pid_maps(5)
- proc_sys_vm(5)
- proc_pid_projid_map(5)
- st(4)
- proc_pid(5)
- issue(5)
- pid_namespaces(7)
- unicode(7)
- inode(7)
- hosts.equiv(5)
- iso-8859-13(7)
- proc_fb(5)
- proc_modules(5)
- proc_pid_autogroup(5)
- keyrings(7)
- sysvipc(7)
- proc_kmsg(5)
- cgroups(7)
- latin6(7)
- proc_pid_uid_map(5)
- unix(7)
- proc_pid_io(5)
- pts(4)
- packet(7)
- ld-linux.so(8)
- tzselect(8)
- iconv(1)
- proc_pid_syscall(5)
- proc_pid_net(5)
- proc_pid_pagemap(5)
- tty(4)
- proc_profile(5)
- standards(7)
- proc_pid_mounts(5)
- filesystems(5)
- iso-8859-15(7)
- locale(5)
- iso_8859_3(7)
- xattr(7)
- iso-8859-2(7)
- proc_uptime(5)
- persistent-keyring(7)
- credentials(7)
- proc_pid_timers(5)
- utmpx(5)
- vcsa(4)
- proc_pid_exe(5)
- proc_net(5)
- proc_timer_stats(5)
- ip(7)
- proc_pid_fd(5)
- ptmx(4)
- user_namespaces(7)
- resolv.conf(5)
- url(7)
- iso_8859_5(7)
- iso_8859-8(7)
- urn(7)
- process-keyring(7)
- proc_pid_auxv(5)
- proc_ksyms(5)
- proc_ide(5)
- veth(4)
- ldd(1)
- proc_swaps(5)
- landlock(7)
- proc_vmstat(5)
- system_data_types(7)
- cp1252(7)
- lirc(4)
- proc_kpageflags(5)
- random(7)
- precedence(7)
- cpuset(7)
- proc_pid_ns(5)
- acct(5)
- latin4(7)
- proc_pid_cgroup(5)
- proc_cpuinfo(5)
- iso_8859-2(7)
- proc_keys(5)
- charsets(7)
- pldd(1)
- proc_pid_stat(5)
- rtnetlink(7)
- netlink(7)
- ram(4)
- mem(4)
- iso-8859-6(7)
- proc_key-users(5)
- iso_8859_15(7)
- fanotify(7)
- proc_sys_net(5)
- sysfs(5)
- math_error(7)
- latin1(7)
- proc_pid_root(5)
- nptl(7)
- proc_cgroups(5)
- proc_iomem(5)
- proc_pid_statm(5)
- sem_overview(7)
- hier(7)
- full(4)
- proc_pid_status(5)
- proc_pid_cwd(5)
- proc_pid_cpuset(5)
- proc_scsi(5)
- uri(7)
- proc_diskstats(5)
- iso_8859_6(7)
- latin2(7)
- latin5(7)
- man-pages(7)
- ld.so(8)
- uts_namespaces(7)
- proc_pid_mountstats(5)
- intro(3)
- proc_pid_seccomp(5)
- proc_pid_wchan(5)
- attributes(7)
- symlink(7)
- mount_namespaces(7)
- charmap(5)
- tis-620(7)
- iso-8859-10(7)
- getent(1)
- proc_buddyinfo(5)
- ttytype(5)
- rtc(4)
- proc_malloc(5)
- suffixes(7)
- sln(8)
- signal(7)
- proc_sys_abi(5)
- signal-safety(7)
- time_namespaces(7)
- proc_pid_comm(5)
- raw(7)
- gai.conf(5)
- proc_crypto(5)
- locale(1)
- iso-8859-3(7)
- motd(5)
- proc_meminfo(5)
- iso-8859-8(7)
- protocols(5)
- proc_pid_map_files(5)
- pthreads(7)
- null(4)
- proc(5)
- zdump(8)
- socket(7)
- proc_sys_kernel(5)
- ddp(7)
- memusagestat(1)
- hd(4)
- iso-8859-14(7)
- shells(5)
- pipe(7)
- glob(7)
- proc_self(5)
- network_namespaces(7)
- utmp(5)
- proc_kcore(5)
- nsswitch.conf(5)
- sd(4)
- iso-8859-5(7)
- iso_8859_16(7)
- man(7)
- iso_8859-6(7)
- dir_colors(5)
- mq_overview(7)
- vsock(7)
- ascii(7)
- thread-keyring(7)
- fs(5)
- proc_pid_attr(5)
- proc_sys_debug(5)
- proc_sys(5)
- proc_pid_cmdline(5)
- pty(7)
- services(5)
- cgroup_namespaces(7)
- securetty(5)
- netdevice(7)
- iso_8859_13(7)
- host.conf(5)
- proc_pid_setgroups(5)
- proc_slabinfo(5)
- sock_diag(7)
- iso_8859-14(7)
- iso-8859-11(7)
- iso_8859_11(7)
- operator(7)
- regex(7)
- wavelan(4)
- proc_sys_fs(5)
- nologin(5)
- proc_pci(5)
- koi8-r(7)
- erofs(5)
- intro(2)
- utf8(7)
- proc_kallsyms(5)
- proc_sysvipc(5)
- queue(7)
- proc_sys_sunrpc(5)
- intro(5)
- latin8(7)
- mtrace(1)
- ipc_namespaces(7)
- dsp56k(4)
- iso_8859_4(7)
- proc_pid_smaps(5)
- proc_cmdline(5)
- rpc(5)
- proc_tty(5)
- proc_version(5)
- smartpqi(4)
- proc_pid_timerslack_ns(5)
- aio(7)
- session-keyring(7)
- resolver(5)
- slabinfo(5)
- wtmp(5)
- iso_8859_9(7)
- proc_locks(5)
- mailaddr(7)
- proc_pid_oom_score(5)
- kmem(4)
- iconvconfig(8)
- iso_8859-7(7)
- glibc(7)
- hostname(7)
- proc_thread-self(5)
- ipv6(7)
- iso_8859_7(7)
- proc_kpagecgroup(5)
- core(5)
- time(7)
- units(7)
- proc_dma(5)
- loop(4)
- address_families(7)
- zero(4)
- intro(4)
- procfs(5)
- iso_8859-4(7)
- vdso(7)
- tmpfs(5)
- iso-8859-16(7)
- iso_8859_10(7)
- user-session-keyring(7)
- libc(7)
- proc_fs(5)
- koi8-u(7)
- latin3(7)
- proc_tid_children(5)
- proc_pid_limits(5)
- proc_pid_coredump_filter(5)
- iso_8859-15(7)
- arp(7)
- urandom(4)
- iso_8859-10(7)
- hpsa(4)
- proc_pid_environ(5)
- boot(7)
- ftm(7)
- ld-linux(8)
- proc_driver(5)
- loop-control(4)
- iso_8859-16(7)
- proc_filesystems(5)
- tzfile(5)
- sprof(1)
- proc_pid_task(5)
- proc_pid_oom_score_adj(5)
- proc_mounts(5)
- iso-8859-4(7)
- iso_8859-1(7)
- utf-8(7)
- iso_8859-13(7)
- intro(6)
- proc_timer_list(5)
- rtld-audit(7)
- iso_8859-3(7)
- group(5)
- sched(7)
- proc_pid_clear_refs(5)
- hosts(5)
- iso_8859-11(7)
- numa(7)
- iso_8859_2(7)
- locale(7)
- iso-8859-1(7)
- fuse(4)
- proc_tid(5)
- proc_execdomains(5)
- proc_pid_mountinfo(5)
- intro(8)
- iso_8859_8(7)
- proc_loadavg(5)
- proc_pid_oom_adj(5)
- re_format(7)
- iso_8859_14(7)
- zic(8)
- bootparam(7)
- inotify(7)
- posixoptions(7)
- proc_partitions(5)
- iso-8859-9(7)
- proc_pid_mem(5)
- networks(5)
- proc_sys_user(5)
- udp(7)
- proc_zoneinfo(5)
- latin10(7)
- proc_pid_fdinfo(5)
- proc_pid_stack(5)
- memusage(1)
- spufs(7)
- pkeys(7)
- path_resolution(7)
- proc_ioports(5)
- intro(1)
- ldconfig(8)
- msr(4)
- svipc(7)
- port(4)
- proc_pid_personality(5)
- cciss(4)
- latin9(7)
- capabilities(7)
- localedef(1)
- vcs(4)
- iso_8859-5(7)
- elf(5)
- proc_sys_proc(5)
- console_codes(4)
- random(4)
- iso-8859-7(7)
- termcap(5)
- cpuid(4)
- environ(7)
- string_copying(7)
- proc_pid_gid_map(5)
- queue(3)
- termio(7)
- user-keyring(7)
- complex(7)
- latin7(7)
- proc_config.gz(5)
- udplite(7)
- kernel_lockdown(7)
- proc_devices(5)
- proc_apm(5)
- iso_8859_1(7)
- proc_pid_numa_maps(5)
apt-get install manpages
Available languages:
en fr pt_BR es pl ko ja ru zh_TW zh_CN deManual
console_codes
μ΄ λ¦μ€ λͺ
Linux console controls
Character sets
Mouse tracking
Comparisons with other terminals
μ£Ό μ
λ² κ·Έ
μΆ κ° μ°Έ μ‘°
λ² μ
μ΄ λ¦
console_codes - 리 λ μ€ μ½ μ μ μ΄ λ¬Έ μ μ μ μ΄ μ μ ꡬ μ‘°
μ€ λͺ
The Linux console implements a large subset of the VT102 and ECMA-48 / ISO/IECΒ 6429 / ANSI X3.64 terminal controls, plus certain private-mode sequences for changing the color palette, character-set mapping, and so on. In the tabular descriptions below, the second column gives ECMA-48 or DEC mnemonics (the latter if prefixed with DEC) for the given function. Sequences without a mnemonic are neither ECMA-48 nor VT102.
λͺ¨ λ μΆ λ ₯ κ³Ό μ μ΄ λ λ κ³ λ¬Έ μ λ€ μ΄ μ½ μ λ λΌ μ΄ λ² μ μ€ μ ν λ¦° ν μ μ ν΄ λ μ°© ν ν μ , κ° μ₯ λ¨Ό μ μΌ μ΄ λ λ μΌ μ μ§ ν μ μ ν΄ μ° μΈ μ½ λ λ€ μ΄ ν λ¦° ν μ μ ν μ½ λ λ€ λ‘ λ° λ λ κ² μ΄ λ€ .
If the console is in UTF-8 mode, then the incoming bytes are first assembled into 16-bit Unicode codes. Otherwise, each byte is transformed according to the current mapping table (which translates it to a Unicode value). See the Character Sets section below for discussion.
μΌ λ° μ μΈ κ²½ μ° , Unicode κ° μ ν° νΈ μΈ λ± μ€ λ‘ λ° λ μ΄ μ , λΉ λ μ€ λ© λͺ¨ 리 μ μ μ₯ λ λ€ . κ·Έ λ μ λ μ ν λ glyph (λΉ λ μ€ ROMμ μ λ κ² κ³Ό κ° μ΄ )κ° ν λ©΄ μ λ ν λ λ€ . Unicodeμ μ¬ μ© (κ³Ό PC hardwareμ λ μ μΈ )μ μ λ 512κ° μ§ λ€ λ₯Έ glyphλ₯Ό λ μ μ μ¬ μ© ν μ μ λ€ .
If the current Unicode value is a control character, or we are currently processing an escape sequence, the value will treated specially. Instead of being turned into a font index and rendered as a glyph, it may trigger cursor movement or other control functions. See the Linux Console Controls section below for discussion.
hard-wire terminal controlμ ν λ‘ κ·Έ λ¨ μ λ£ λ κ² μ μΌ λ° μ μΌ λ‘ μ’ μ μΌ μ μ λ λ€ . 리 λ μ€ λ ν° λ―Έ λ κΈ° λ₯ μ terminfo (5) λ° μ΄ ν° λ² μ΄ μ€ λ₯Ό μ§ μ ν λ€ . μ½ μ escape μ ν μ€ λ₯Ό μ§ μ λ΄ λ³΄ λ΄ λ κ² λ³΄ λ¨ , terminfoμ μ¬ μ© ν λ € ν κ² μ΄ λ€ . -μ€ ν¬ λ¦° λΌ μ΄ λΈ λ¬ λ¦¬ μ . ncurses (3), tput (1), νΉ μ reset (1). λ₯Ό μ κ³ λ λ€ λ©΄ .
Linux console controls
μ΄ μΉ μ μ μ 리 λ μ€ μ½ μ μ μ μ νΉ λ³ ν κΈ° λ₯ λ€ μ (μ λ₯Ό λ€ μ λ©΄ ν μ 컀 μ μ μΉ μ μ plyphλ₯Ό μ° λ κ² κ° μ ) ν λ λͺ¨ λ μ μ΄ λ¬Έ μ μ escape μ ν μ€ λ₯Ό λ€ λ£¨ μ λ€ .
Control characters
A character is a control character if (before transformation according to the mapping table) it has one of the 14 codes 00 (NUL), 07 (BEL), 08 (BS), 09 (HT), 0a (LF), 0b (VT), 0c (FF), 0d (CR), 0e (SO), 0f (SI), 18 (CAN), 1a (SUB), 1b (ESC), 7f (DEL). One can set a "display control characters" mode (see below), and allow 07, 09, 0b, 18, 1a, 7f to be displayed as glyphs. On the other hand, in UTF-8 mode all codes 00β1f are regarded as control characters, regardless of any "display control characters" mode.
μ
μ΄ λ¬Έ μ λ₯Ό κ° μ§
κ³ μ λ€ λ©΄ , κ·Έ κ²
μ μ¦ μ μ μ© λ
κ³ μ¬ λΌ μ§ λ€ . (κ·Έ
κ² μ΄ escape μ ν μ€ μ€
μ μ λ€ ν λ λΌ
λ .) κ·Έ 리 κ³ escape μ
ν μ€ λ λ€ μ λ¬Έ
μ λ‘ κ³ μ λ λ€ .
(ν μ§ λ§ , ESCλ μ΄ λ»
κ² λ μ μ§ λ λ
μ§ μ μ μ΄ μ μ
κ² μ μ€ μ§ μ ν€
κ³ , μ λ‘ μ΄ escape μ
ν μ€ λ₯Ό μ μ ν
λ€ . κ·Έ 리 κ³ CANκ³Ό
SUBλ μ΄ λ€ escape μ ν
μ€ λΌ λ λ λΈ λ€ .)
μΈ μ¦ λ μ μ΄ λ¬Έ
μ λ BEL, BS, HT, LF, VT, FF, CR, SO, SI, CAN,
SUB, ESC, DEL, CSI.μ΄ λ€ . μ΄ κ²
λ€ μ μ λ λ λ‘
λ μ ν λ€ :
BEL (0x07,
^G
)
beeps;
BS (0x08, ^H )
λ ν 컬 λΌ μ ν ν λ€ . (λ¨ , ν μ μ μ μ μ§ λ μΉ μ§ μ λ λ€ );
HT (0x09, ^I )
λ λ€ μ ν μ λ§ μ§ λ§ μΌ λ‘ κ° κ±° λ μ΄ μ ν μ λ§ μ§ λ§ μ΄ μ λ€ λ©΄ μ€ μ λ μΌ λ‘ κ° λ€ ;
LF (0x0A,
^J
)
VT (0x0B,
^K
)
FF (0x0C,
^L
)
all give a linefeed, and if LF/NL (new-line mode) is set also a carriage return;
CR (0x0D, ^M )
μ μΌ λ¦¬ μ§ λ₯Ό 리 ν΄ ν λ€ ;
SO (0x0E, ^N )
λ G1λ¬Έ μ κ΅° μ ν μ± ν ν λ€ ;
SI (0x0F, ^O )
λ G0λ¬Έ μ κ΅° μ ν μ± ν ν λ€ ;
CAN (0x18,
^X
)
SUB (0x1A,
^Z
)
abort escape sequences;
ESC (0x1B, ^[ )
λ escape μ ν μ€ λ₯Ό μ μ ν λ€ ;
DEL (0x7F)
μ 무 μ λ λ€ ;
CSI (0x9B)
λ ESCμ ν΄ λΉ λ λ€ . [.
|
ESC- but not CSI-sequences |
||||||
|
|
||||||
|
|
ECMA-48 CSI sequences
CSI (or ESC []λ μΈ λ―Έ μ½ λ‘ μΌ λ‘ κ΅¬ λΆ λ λ μ μ§ μ λ§€ κ° λ³ μ μ (κ±° μ NPAR(16)) μ ν μ€ λ‘ μ€ ν λ λ€ . λΉ μ΄ μ λ λ§€ κ° λ³ μ λ 0κ° μ΄ μ£Ό μ΄ μ§ λ€ . λ§€ κ° λ³ μ μ μ ν μ μ μ μ ν λ μ λ¬Ό μ ν λ₯Ό λΆ μ¬ λ μ μ κ² μ΄ λ€ .
ν μ§ λ§ , CSI [ (or ESC [ []λ€ μ μ λ¬Έ μ ν λ κ° μ½ ν κ³ , μ΄ λͺ¨ λ μ ν μ€ κ° λ¬΄ μ λ λ€ . (λ° μ μ λ° ν λ λ κΈ° λ₯ ν€ λ₯Ό 무 μ ν λ κ² μ΄ λ€ .)
|
CSI μ ν μ€ λ κ·Έ κ² μ λ§ μ§ λ§ λ¬Έ μ μ μ ν΄ κ²° μ λ λ€ . |
ECMA-48 Select Graphic Rendition
|
The ECMA-48 SGR sequence ESC [ parameters m sets display attributes. Several attributes can be set in the same sequence, separated by semicolons. An empty parameter (between semicolons or string initiator or terminator) is interpreted as a zero. |
|
Commands 38 and 48 require further arguments: |
ECMA-48 Mode
Switches
ESC [ 3 h
DECCRM (default off): λ μ€ ν λ μ΄ μ€ μ chars.
ESC [ 4 h
DECIM (default off): μ½ μ λͺ¨ λ μ€ μ .
ESC [ 20 h
LF/NL (default off): μ λ μ μΌ λ‘ LF, VT νΉ μ CRκ³Ό FFμ μ μ½ λ₯Ό λ° μ .
ECMA-48
Status Report Commands
ESC [ 5 n
Device status report (DSR): μ λ΅ μ ESC [ 0 n (Terminal OK).
ESC [ 6 n
Cursor position report (CPR): μ λ΅ μ ESC [ y ; x R, where x,y is the cursor location.
DEC Private Mode (DECSET/DECRST) sequences
ECMA-48μ
λ ν μ€ λͺ
μ μ
λ€ . Set Mode sequencesλ₯Ό 리 μ€
νΈ μ μ¬ λ Έ λ€ ; Reset Mode
sequencesλ λ§ μ§ λ§ 'h'λ₯Ό
'l'λ‘ λ° κΎΈ λ©΄ λ λ€ .
ESC [ ? 1 h
DECCKM (default off): μ€ μ λ λ©΄ , 컀 μ ν€ λ ESC보 λ€ ESC O μ λ μ¬ λ₯Ό 보 λΈ λ€ [.
ESC [ ? 3 h
DECCOLM (default off = 80 columns): 80/132 col mode switch. λ λΌ μ΄ λ² μ μ€ μ μ ν λ©΄ μ΄ κ² λ§ μΌ λ‘ λ μΆ© λΆ μΉ λͺ» ν λ€ κ³ ν λ€ ; resizecons (8) μ κ° μ μ μ λͺ¨ λ μ μ νΈ λ¦¬ ν° κ° μ½ μ λΉ λ μ€ μΉ΄ λ μ μ ν λ μ¨ μ΄ λ μ§ μ€ ν° λ₯Ό λ° κΏ μΌ λ§ ν λ€ .
ESC [ ? 5 h
DECSCNM (default off): 리 λ² μ€ λΉ λ μ€ λͺ¨ λ λ₯Ό μ€ μ ν λ€ .
ESC [ ? 6 h
DECOM (default off): μ€ μ ν λ©΄ , 컀 μ μ΄ λ λ μ± μ μ€ ν¬ λ‘€ λ§ κ΅¬ μ μ μ μ μΌ μͺ½ μ½ λ μ κ΄ λ ¨ λ λ€ .
ESC [ ? 7 h
DECAWM (default on): autowrapμ μΌ μ§ μ ν λ‘ μ€ μ ν λ€ . μ΄ λͺ¨ λ μ μ λ , 80μ΄ (DECCOLM μ΄ μΌ μ‘ μ λ λ 132μ΄ )ν μ λ μ¨ κ·Έ λ ν½ λ¬Έ μ κ° λ€ μ μ΄ μ μ μ μ λ° μ΄ λΈ λ€ .
ESC [ ? 8 h
DECARM (default on): ν€ λ³΄ λ μ λ λ° λ³΅ μ μΌ λ€ .
ESC [ ? 9 h
X10 Mouse Reporting (default off): 리 ν¬ ν λͺ¨ λ λ₯Ό 1λ‘ μ€ μ ν λ€ .(νΉ μ 0μ 리 μ ν λ€ .)βμ λ λ₯Ό μ°Έ μ‘° .
ESC [ ? 25 h
DECTECM (default on): 컀 μ λ₯Ό 보 μ΄ κ² ν λ€ .
ESC [ ? 1000 h
X11 Mouse Reporting (default off): 리 ν¬ ν λͺ¨ λ λ₯Ό 2λ‘ μ€ μ ν λ€ .(νΉ μ 0μΌ λ‘ λ¦¬ μ ν λ€ .)βμ λ μ°Έ μ‘° .
Linux Console Private CSI Sequences
|
The following sequences are neither ECMA-48 nor native VT102. They are native to the Linux console driver. Colors are in SGR parameters: 0 = black, 1 = red, 2 = green, 3 = brown, 4 = blue, 5 = magenta, 6 = cyan, 7 = white; 8β15 = bright versions of 0β7. |
Character sets
컀 λ μ μ½ μ μ μ μ λ° μ΄ νΈ μ λ³ ν μ 4κ° μ λ ꡬ λΆ ν λ€ . κ·Έ 4κ° μ§ ν μ΄ λΈ μ μ λ μ κ° λ€ : a) Latin1 -> PC, b) VT100 graphics -> PC, c) PC -> PC, d) μ¬ μ© μ μ μ .
G0κ³Ό G1μ΄ λΌ λΆ λ¦¬ λ λ κ° μ§ λ¬Έ μ κ΅° (character sets)μ΄ μ κ³ , κ·Έ μ€ ν λ κ° ν μ ν΅ μ© λ λ λ¬Έ μ κ΅° μ΄ λ€ .(보 ν΅ G0) ^N μ μ λ ₯ ν¨ μΌ λ‘ μ¨ G1μ μ¬ μ© ν μ μ λ€ . ^O μ μ λ ₯ ν λ©΄ G0μΌ λ‘ λ° λ λ€ .
μ΄ κ° λ³ μ μΈ G0κ³Ό G1μ λ³ ν ν μ΄ λΈ μ λ§ ν κ³ , μ¬ μ© μ κ° λ° κΏ μ μ λ€ . μ² μ μ κ·Έ κ² λ€ μ κ° κ° ν μ΄ λΈ a)μ b)λ₯Ό λ» ν λ€ . ESC ( B, ESC ( 0, ESC ( Uμ ESC ( K μ ν μ€ λ€ μ κ° κ° G0κ° λ³ ν ν μ΄ λΈ a), b), c)μ d)λ₯Ό κ° λ₯΄ ν€ λ λ‘ ν λ€ . ESC ) B, ESC ) 0, ESC ) Uμ ESC ) K μ ν μ€ λ G1μ΄ κ° κ° ν μ΄ λΈ a), b), c) κ·Έ 리 κ³ d)μ λ» ν κ² ν λ€ .
The sequence ESC c causes a terminal reset, which is what you want if the screen is all garbled. The oft-advised "echo ^V^O" will make only G0 current, but there is no guarantee that G0 points at table a). In some distributions there is a program reset (1) that just does "echo ^[c". If your terminfo entry for the console is correct (and has an entry rs1=\Ec), then "tput reset" will also work.
μ¬ μ© μ μ μ λ§΅ ν ν μ΄ λΈ μ mapscrn (8). μ μ΄ μ© ν΄ μ€ μ ν μ μ λ€ . λ§΅ ν μ κ²° κ³Ό λ κΈ° νΈ cκ° ν λ¦° νΈ λ λ©΄ , κΈ° νΈ s = map[c] κ° λΉ λ μ€ λ© λͺ¨ 리 λ‘ λ³΄ λ΄ μ§ λ€ sμ ν΄ λΉ ν λ λΉ νΈ λ©₯ μ λ¬Έ μ ROMμ μ μ°Ύ κ³ , setfont (8). μ¬ μ© μ΄ λ° λ μ μ κ² λ λ€
Mouse tracking
λ§ μ° μ€ μΆ μ κΈ° λ₯ μ μ λ λͺ© μ μ xterm (1)(λ§ μ° μ€ νΈ ν μ ν 리 ν¬ νΈ )μ λ° ν ν λ κ² μ΄ λ€ . μ½ μ λ λΌ μ΄ λ² λ λ§ μ° μ€ μ₯ μΉ λ , ν μ μ μ μ μ κΈ° λ λ¬Έ μ , κ° μ ν° λ―Έ λ λ λΌ μ΄ λ² κ° λ§ μ° μ€ μ λ° μ΄ νΈ ioctlμ λ° μ μ λ λ§ μ½ μ μ λ ₯ μ€ νΈ λ¦Ό μ μ μ μ΄ λ¦¬ ν¬ νΈ κ° λ° ν λ λ€ . μ΄ ioctlsμ λ° λ μ gpm (8) λ° λͺ¬ κ³Ό κ° μ mouse-aware user-mode μ΄ ν 리 μΌ μ΄ μ μ μ ν΄ λ° μ λ μ΄ μΌ ν λ€ .
The mouse tracking escape sequences generated by xterm (1) encode numeric parameters in a single character as value +040. For example, '!' is 1. The screen coordinate system is 1-based.
μ΄ λ€ X10 νΈ ν λͺ¨ λ λ escape sequenceλ₯Ό μ μΉ μ λ λ € μ§ λ§ μ° μ€ λ² νΌ μ μΈ μ½ λ© ν λ² νΌ μ΄ λ λ¬ μ‘ μ λ 보 λΈ λ€ . It is enabled by ESC [ ? 9 hλ₯Ό 보 λ μΌ λ‘ μ¨ μ΄ κ² μ κ° λ₯ ν κ² ν κ³ , ESC [ ? 9 lλ₯Ό 보 λ μΌ λ‘ μ¨ λΆ κ° λ₯ ν κ² ν λ€ .. button pressμ μ , xterm (1)μ ESC [ M bxy (6 characters)λ₯Ό 보 λΈ λ€ . b λ λ² νΌ -1μ΄ κ³ , λ§ μ° μ€ λ₯Ό λ λ μ λ μ x μ y λ λ§ μ° μ€ μ x, yμ’ ν μ΄ λ€ . μ΄ μ½ λ λ λͺ¨ λ 컀 λ μ μ μ μ© λ λ€ .
Normal tracking mode (not implemented in Linux 2.0.24) sends an escape sequence on both button press and release. Modifier information is also sent. It is enabled by sending ESC [ ? 1000 h and disabled with ESC [ ? 1000 l. On button press or release, xterm (1) sends ESC [ M bxy . The low two bits of b encode button information: 0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release. The upper bits encode what modifiers were down when the button was pressed and are added together: 4=Shift, 8=Meta, 16=Control. Again x and y are the x and y coordinates of the mouse event. The upper left corner is (1,1).
Comparisons with other terminals
Many different terminal types are described, like the Linux console, as being "VT100-compatible". Here we discuss differences between the Linux console and the two most important others, the DEC VT102 and xterm (1).
Control-character handling
VT102 μ
μ μ λ μ μ΄ λ¬Έ
μ λ€ μ μΈ μ ν
λ€ :
NUL (0x00)
μ 무 μ ν λ€ ;
ENQ (0x05)
μ λ΅ λ© μ μ§ λ₯Ό νΈ λ¦¬ κ±° ν λ€ ;
DC1 (0x11, ^Q , XON)
μ μ‘ μ μ¬ κ° ν λ€ ;
DC3 (0x13, ^S , XOFF)
VT100μΌ λ‘ ν μ¬ κΈ XOFFμ XONμ μ μΈ ν λͺ¨ λ μ½ λ λ₯Ό 무 μ ν λ€ (κ·Έ 리 κ³ μ μ‘ μ λ© μΆ λ€ )
VT100-like DC1/DC3 processing may be enabled by the terminal driver.
xterm (1) ν λ‘ κ·Έ λ¨ (VT100 λͺ¨ λ μ μ )μ BEL, BS, HT, LF, VT, FF, CR, SO, SI, ESC μ μ΄ λ¬Έ μ λ₯Ό μΈ μ ν λ€ .
Escape sequences
|
VT100 μ½ μ μ ν μ€ λ 리 λ μ€ μ½ μ μ μ μ€ ν λ μ§ μ λ λ€ . |
The program xterm (1) (in VT100 mode) recognizes ESC c, ESC # 8, ESC >, ESC =, ESC D, ESC E, ESC H, ESC M, ESC N, ESC O, ESC P ... ESC \, ESC Z (it answers ESC [ ? 1 ; 2 c, "I am a VT100 with advanced video option") and ESC ^ ... ESC \ with the same meanings as indicated above. It accepts ESC (, ESC ), ESC *, ESC + followed by 0, A, B for the DEC special character and line drawing set, UK, and US-ASCII, respectively.
The user can configure xterm (1) to respond to VT220-specific control sequences, and it will identify itself as a VT52, VT100, and up depending on the way it is configured and initialized.
|
It accepts ESC ] (OSC) for the setting of certain resources. In addition to the ECMA-48 string terminator (ST), xterm (1) accepts a BEL to terminate an OSC string. These are a few of the OSC control sequences recognized by xterm (1): |
|
It recognizes the following with slightly modified meaning (saving more state, behaving closer to VT100/VT220): |
|
It also recognizes |
It also recognizes ESC % and provides a more complete UTF-8 implementation than Linux console.
CSI Sequences
Old versions of xterm (1), for example, from X11R5, interpret the blink SGR as a bold SGR. Later versions which implemented ANSI colors, for example, XFree86 3.1.2A in 1995, improved this by allowing the blink attribute to be displayed as a color. Modern versions of xterm implement blink SGR as blinking text and still allow colored text as an alternate rendering of SGRs. Stock X11R6 versions did not recognize the color-setting SGRs until the X11R6.8 release, which incorporated XFree86 xterm. All ECMA-48 CSI sequences recognized by Linux are also recognized by xterm , however xterm (1) implements several ECMA-48 and DEC control sequences not recognized by Linux.
The xterm (1) program recognizes all of the DEC Private Mode sequences listed above, but none of the Linux private-mode sequences. For discussion of xterm (1)βs own private-mode sequences, refer to the Xterm Control Sequences document by Edward Moy, Stephen Gildea, and Thomas E. Dickey available with the X distribution. That document, though terse, is much longer than this manual page. For a chronological overview,
http://invisible-island.net/xterm/xterm.log.html
details changes to xterm.
The vttest program
http://invisible-island.net/vttest/
demonstrates many of these control sequences. The xterm (1) source distribution also contains sample scripts which exercise other features.
μ£Ό μ
ESC 8 (DECRC) is not able to restore the character set changed with ESC %.
λ² κ·Έ
2.0.23 λ² μ μ μ , CSIκ° μ λ ν μ§ μ κ³ , NULμ λ΄ λΆ escape μ ν μ€ λ₯Ό 무 μ ν μ§ μ λ λ€ .
Some older kernel versions (after Linux 2.0) interpret 8-bit control sequences. These "C1 controls" use codes between 128 and 159 to replace ESC [, ESC ] and similar two-byte control sequence initiators. There are fragments of that in modern kernels (either overlooked or broken by changes to support UTF-8), but the implementation is incomplete and should be regarded as unreliable.
Linux "private mode" sequences do not follow the rules in ECMA-48 for private mode control sequences. In particular, those ending with ] do not use a standard terminating character. The OSC (set palette) sequence is a greater problem, since xterm (1) may interpret this as a control sequence which requires a string terminator (ST). Unlike the setterm (1) sequences which will be ignored (since they are invalid control sequences), the palette sequence will make xterm (1) appear to hang (though pressing the return-key will fix that). To accommodate applications which have been hardcoded to use Linux control sequences, set the xterm (1) resource brokenLinuxOSC to true.
An older version of this document implied that Linux recognizes the ECMA-48 control sequence for invisible text. It is ignored.
μΆ κ° μ°Έ μ‘°
ioctl_console (2), charsets (7)
λ² μ
μ΄ λ§€ λ΄ μΌ ν μ΄ μ§ μ ν κ΅ μ΄ λ² μ μ λ€ μ μ μ ν΄ νΈ μ§ λ μ μ΅ λ λ€ : ASPLINUX <man@asp-linux.co.kr>
μ΄ λ² μ μ 무 λ£ λ¬Έ μ μ λ λ€ . μ μ κΆ μ‘° 건 μ λ ν΄ μ λ GNU General Public License λ² μ 3 μ΄ μ μ μ½ μΌ μ μ μ€ . μ± μ μ΄ μ μ΅ λ λ€ .
μ΄ λ§€ λ΄ μΌ ν μ΄ μ§ μ λ² μ μ μ μ€ λ₯ λ₯Ό λ° κ²¬ ν λ©΄ translation-team-ko@googlegroups.com λ‘ μ΄ λ© μΌ μ 보 λ΄ μ£Ό μ μ μ€ .