Ale*_*ler 6 terminal sequences terminfo tmux
我正在尝试使用alt-left,alt-right序列配置tmux以在窗口之间切换.这就是我在.tmux.conf中的内容
bind-key -n M-Left previous-window
bind-key -n M-Right next-window
Run Code Online (Sandbox Code Playgroud)
不幸的是,它不起作用.在我的机器上,alt-left和alt-right分别绑定到^ [[1; 3D和^ [[1; 3C].我想我必须使用terminfo override告诉tmux使用这些序列,但我不知道如何.所以,任何帮助将不胜感激.
谢谢!
如果该xterm-keys选项关闭,tmux将忽略这些键(因为它会识别它们并在未设置该选项时丢弃它们)。tmux一段时间以来,用户都对这种区别感到困惑,在2016 年底,开发人员更改了该选项的默认值:
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.
Run Code Online (Sandbox Code Playgroud)
这仍然依赖于终端描述,正如我在远程计算机上的 tmux 中指出的那样,没有获得正确的前缀+箭头键