Key escape sequences not working for tmux

百般思念 提交于 2019-12-23 18:53:34

问题


I have been using iTerm2 and vim for a while. I have experienced some issues when I needed to use key combinations such as CTRL-F10 and SHIFT-F10 inside a vim session running inside iTerm2. It is straight forward to define key bindings such as <C-F10> and <S-F10> for the GUI version of MacVim. No problems there.

However, it proved to be difficult to get the same key combinations in the terminal version of MacVim. I have solved this by using iTerm2's Send Escape Sequence functionality. Once I have defined CTRL-F10 as [21;5~ and SHIFT-F10 as [21;2~ in my iTerm2 profile, those were now working inside the terminal MacVim without any issues.

Recently, I have hit a new wall, when I decided to add tmux to the equation. I have noticed that those escape sequences are no longer working for a terminal MacVim running inside a tmux pane. That is my problem.

I have been focusing on the Send Hex Code option, which seems to be working. I tested it with some known hex codes such as 0x04 which is Ctrl-d and it works. The problem is that I could not find the hex codes for CTRL-F10 and SHIFT-F10.

So the solution is either make tmux receive my escape codes coming from iTerm2 or find the hex codes for the keys that I need to be working inside tmux.

来源:https://stackoverflow.com/questions/36321804/key-escape-sequences-not-working-for-tmux

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!