screen是不可以鼠标滚屏的,但是可以通过设置screenrc文件自定义快捷键。
C-k 上滚一行 C-j 下滚一行 Meta-k 上滚一屏 Meta-j 下滚一屏
其实想要滚屏只有进入copy模式(依次按下C-a [ ) 然后
C-f C-b C-j C-k这样就可以,但是linux不就是用来偷懒的吗,肯定要keybounding 啊
找到设置文件screenrc 我的是在/etc/screenrc 很多人说是~/.screenrc 然而我没有,可能不同的版本有所不同吧。
打开screenrc 加入以下内容
bindkey "^[k" eval "copy" "stuff ^b" # enter copy mode and move up one page bindkey "^k" eval "copy" "stuff k" # enter copy mode and move up one line bindkey -m "^[k" stuff ^b # move up one page bindkey -m "^k" stuff k # move up one line bindkey "^[j" eval "copy" "stuff ^f" # enter copy mode and move down one page bindkey "^j" eval "copy" "stuff j" # enter copy mode and move down one line bindkey -m "^[j" stuff ^f # move down one page bindkey -m "^j" stuff j # move down one lineDone 参考资料: https://www.saltycrane.com/blog/2008/01/how-to-scroll-in-gnu-screen/