【问题标题】:How to have my mouse wheel scroll the screen on zsh?如何让我的鼠标滚轮在 zsh 上滚动屏幕?
【发布时间】:2014-09-21 00:22:14
【问题描述】:

我通过带有 Tera Term 4.84 的 SSH 在 Ubuntu 14.04.1 LTS 上使用 zsh 5.0.2。
我的 .zshrc 在这里(我的用户名被替换为 $USERNAME):

# Lines configured by zsh-newuser-install
HISTFILE=~/.zsh_history
HISTSIZE=50
SAVEHIST=50
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/$USERNAME/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall

PROMPT="%n@%m:%c%# "

在我的外壳中,当我旋转鼠标滚轮时, 命令历史移动而不是滚动屏幕。

另一台主机上的 Zsh 4.3.17 (Ubuntu 12.04.5 LTS) 同一个客户端可以用鼠标滚轮很好的滚动。

如何在不按 Ctrl 键的情况下让我的 zsh 用鼠标滚轮滚动?


这里也有这个问题(日语):http://dixq.net/forum/viewtopic.php?f=3&t=15586

【问题讨论】:

  • 听起来更像是终端仿真器的问题,而不是 zsh。

标签: terminal zsh


【解决方案1】:

正如@jimmij 指出的那样,这是 Tera Term 的问题,而不是 zsh

根据Tera Term documentation,有两个配置选项可以控制鼠标滚轮的行为:TranslateWheelToCursorDisableWheelToCursorByCtrl。它们的默认值为:

TranslateWheelToCursor=on
DisableWheelToCursorByCtrl=on

设置TranslateWheelToCursor=off 应该禁用默认滚轮行为。

【讨论】:

    猜你喜欢
    • 2011-01-21
    • 2014-07-28
    • 2015-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-24
    • 1970-01-01
    相关资源
    最近更新 更多