问题
On OSX with tmux installed through homebrew I cannot seem to get my 'delete' key to work. I am using iterm2 and have my delete mapped to ^H. Without tmux the 'delete' key works fine.
回答1:
I came across this and I found a solution for me.
Tmux uses ^?
for delete. stty was not sending ^?
.
I changed that using stty erase '^?'
and then changed my preferences in iTerm2 for delete to send ^?
https://github.com/tmux/tmux/issues/335
回答2:
This might be some terminal emulation issue within your shell.
When you are in a tmux session, enter the following in the bash prompt and see if it works:
stty erase ^H
If this helps, check your terminal tty settings.
来源:https://stackoverflow.com/questions/23848061/cannot-get-delete-key-to-work-with-tmux-and-osx