Terminal 在tmux中使用Alt left/right在窗口之间切换

Terminal 在tmux中使用Alt left/right在窗口之间切换,terminal,sequences,tmux,terminfo,Terminal,Sequences,Tmux,Terminfo,我正在尝试配置tmux以使用alt left、alt right序列在窗口之间切换。这是我的.tmux.conf中的内容 bind-key -n M-Left previous-window bind-key -n M-Right next-window 不幸的是,它不起作用。在我的机器上,alt left和alt right分别绑定到^[[1;3D和^[[1;3C。我想我必须使用terminfo override来告诉tmux使用这些序列,但我不知道如何使用。因此,任何帮助都将不胜感激 谢谢

我正在尝试配置tmux以使用alt left、alt right序列在窗口之间切换。这是我的.tmux.conf中的内容

bind-key -n M-Left previous-window
bind-key -n M-Right next-window
不幸的是,它不起作用。在我的机器上,alt left和alt right分别绑定到^[[1;3D和^[[1;3C。我想我必须使用terminfo override来告诉tmux使用这些序列,但我不知道如何使用。因此,任何帮助都将不胜感激


谢谢!

如果禁用了
xterm-keys
选项,
tmux
将忽略这些键(因为它将识别它们,并在未设置该选项时丢弃它们)。
tmux
的用户已经被这种区别迷惑了一段时间,并且在最后,开发人员更改了该选项的默认值:

Change the xterm-keys option to default to on, so that tmux will generate xterm(1) escape sequences for function keys with modifiers.

With the option off most of these keys are ignored by default, except
for ctrl + arrows which use a variant that nothing else seems to use and
I don't remember why we chose. The xterm escape sequences are now the
most common.

这仍然依赖于终端描述,正如我在

中指出的,tmux应该自动识别这些序列,无论您在外部使用什么术语(也不管相应的terminfo条目说什么)。在将这些项放入配置文件后,是否重新启动了tmux服务器?如果所有命令都是幂等的,则可以在现有服务器中选择更改。@ChrisJohnsen我完全确定tmux选择了配置。您是否找到了此问题的答案?我也遇到了同样的问题在Ubuntu12.04、terminator 0.96和tmux 1.9a中,我刚刚在Ubuntu16.04中尝试了这一点,它对我很有用。