我最近在新的 ubuntu 设置上安装了 zsh (v5.1.1),但是当我在 gnome-terminal 中切换到它时,我似乎无法使用 Enter 键来执行命令。我可以执行命令的唯一方法是使用CTRL+J. 我可以在其他术语模拟器(如xterm和 )中复制这一点uxterm。
所有其他键都可以正常工作,包括 HOME、END、PGUP、PGDOWN、DEL 和 INSERT 键。
我zsh在其他系统上安装了很多次,但以前从未遇到过这样的问题。我需要改变什么才能让回车键正常工作?
我的/etc/zsh/zshrc文件:
typeset -ga debian_missing_features
if [[ -z "$DEBIAN_PREVENT_KEYBOARD_CHANGES" ]] &&
[[ "$TERM" != 'emacs' ]]
then
typeset -A key
key=(
BackSpace "${terminfo[kbs]}"
Home "${terminfo[khome]}"
End "${terminfo[kend]}"
Insert "${terminfo[kich1]}"
Delete "${terminfo[kdch1]}"
Up "${terminfo[kcuu1]}"
Down "${terminfo[kcud1]}"
Left "${terminfo[kcub1]}"
Right "${terminfo[kcuf1]}"
PageUp "${terminfo[kpp]}"
PageDown "${terminfo[knp]}"
)
function bind2maps () {
local i sequence widget
local -a …Run Code Online (Sandbox Code Playgroud)