ill*_*out 12 termcap gnu-screen scrolling
在 Linux 终端中,按键序列 Shift-PageUp 通常可用于向上滚动。
但是,当通过 ssh 连接到特定机器时,此键序列在 gnu 屏幕中似乎不起作用。
我有两个问题。1) 这个键序列是在哪里定义的?2) 我可以在我的屏幕设置中更改什么以始终允许这样做?
这与 termcap 条目有关吗?
我目前正在使用三台机器。当按下 Shift-PageUp 时,其中两个将向上滚动缓冲区。一台机器根本不会响应按键。
工作机器:
不工作的机器:
这是我在所有三台机器上都使用的 .screenrc
termcapinfo xterm|xterms|xs|rxvt ti@:te@
term screen-256color
hardstatus on
hardstatus alwayslastline
hardstatus string "%{= wb}%-w%{.yb}%n %t%{-}%+w %=%{b r} %H %{..b}[%l] %{..K}%C%a "
startup_message off
# turn off visual bell
vbell off
# Autodetach session on hangup instead of terminating screen completely
autodetach on
# give more scroll back
defscrollback 20000
# turn on alternate screen support
altscreen on
# bash will be replaced by the running command
shelltitle " $ |bash"
screen 3
screen 2
screen 1
Run Code Online (Sandbox Code Playgroud)
我不确定这是否重要,但我使用 ROXTerm 作为我的终端模拟器。
注意:我知道 Ctrl-A [ 可用于进入屏幕的复制模式回滚缓冲区。但是我不想使用这个。我很感兴趣,为什么屏幕中的 Shift-PageUp 在某些机器上按预期工作,但在其他机器上完全被忽略。
编辑:通过将 .screenrc 中的 termcapinfo 行更改为以下内容,我能够在一台无法使用的机器上解决此问题:
termcapinfo xterm*|xs|rxvt ti@:te@
Run Code Online (Sandbox Code Playgroud)
在一台无法工作的机器上,我的 $TERM 环境变量被设置为 xterm-256color,那么是否可能没有“xterm-256color”的 termcap/terminfo 条目?
我不确定这是否有帮助(我不知道如何绑定 Shift 键),但我正在使用:
bindkey ^[[5;5~ eval "copy" "stuff ^U"
bindkey ^[[6;5~ eval "copy" "stuff ^D"
Run Code Online (Sandbox Code Playgroud)
在我的 .screenrc 中将Ctrl+ Page Up/绑定Page Down到:
- 进入“复制”模式
-按Ctrl+ U/ D(因为它类似于 Vim 移动)
| 归档时间: |
|
| 查看次数: |
4493 次 |
| 最近记录: |