ANSI转义序列保存/恢复光标位置支持 [英] ANSI escape sequence save/restore cursor position support
问题描述
是否有任何支持ANSI转义序列的向上,向下,向前和向后光标键的终端:
Are there any known terminals which support the ANSI escape sequences for cursor keys up, down, forward and back:
CSI n A Cursor Up
CSI n B Cursor Down
CSI n C Cursor Forward
CSI n D Cursor Back
但不支持保存光标位置和还原光标位置的转义序列吗?
but don't support the save-cursor-position and restore-cursor-position escape sequences?
CSI s Save Cursor Position
CSI u Restore Cursor Position
推荐答案
正版VT100(或VT220)无法识别这些用于保存/恢复光标位置的控制序列。它们使用(如xterm的控制序列列表)
A genuine VT100 (or VT220 for that matter) did not recognize these control sequences for save/restore cursor position. They use (as noted in xterm's control sequences list)
ESC 7 Save Cursor (DECSC).
ESC 8 Restore Cursor (DECRC).
这些是 sc
和<$ c terminfo中的$ c> rc 功能;您可能会使用
Those are the sc
and rc
capabilities in terminfo; you may see these listed using
infocmp vt100
infocmp vt220
CSI s
和 CSI r
可能来自 ansi.sys
(请参见终端数据库条目中的 ansi.sys-old ),尽管始终可以使用较旧的资源。
The origin of CSI s
and CSI r
likely is from ansi.sys
(see terminal database entry for ansi.sys-old), though an older source is always possible.
这篇关于ANSI转义序列保存/恢复光标位置支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!