gpt4 book ai didi

mousewheel - 在 GNU screen 中使用滚轮

转载 作者:行者123 更新时间:2023-12-03 04:05:59 29 4
gpt4 key购买 nike

如何设置 GNU screen 以允许鼠标滚轮在回滚缓冲区中滚动?我尝试在 Google 上搜索此事,但大多数点击都是关于如何允许 screen 内的应用程序使用滚轮。

最佳答案

我相信您可以将这样的行添加到您的 ~/.screenrc 中:

termcapinfo xterm* ti@:te@

其中“xterm*”是当前术语的全局匹配。要确认其正常工作,请按 ^A^D 从 screen 上分离,然后按 screen -d -r 重新连接,然后按 ls 几次,然后尝试向后滚动。它对我有用。

<小时/>

这是什么魔法?好吧,让我们查阅手册页。

screen (1)说:

termcapinfo term terminal-tweaks [window-tweaks]
[..]
The first argument specifies which terminal(s) should be affected by this
definition. You can specify multiple terminal names by separating them with
`|'s. Use `*' to match all terminals and `vt*' to match all terminals that
begin with "vt".
[..]
Some examples:

termcap xterm* LP:hs@

Informs screen that all terminals that begin with `xterm' have firm
auto-margins that allow the last position on the screen to be updated (LP),
but they don't really have a status line (no 'hs' - append `@' to turn
entries off). Note that we assume `LP' for all terminal names that start
with "vt", but only if you don't specify a termcap command for that terminal.

来自 termcap(5):

String capabilities
[..]
te End program that uses cursor motion
ti Begin program that uses cursor motion

关于mousewheel - 在 GNU screen 中使用滚轮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/359109/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com