Sometimes when I use the mouse, or press and hold a movement key in tmux, random characters are inserted. For example, when I press the left movement key, "D" is often inserted. A left mouse click often results in "[M#§T" - Does anyone know why this is?

I'm using tmux-1.6, and I get these errors over an SSH session & using mobaXterm on Windows 7.


I have been running into this problem also (my terminal being terminator), and found the comment about the UTF8 mouse helped. I was actually able to continue using my current terminal program with tmux set mouse-utf8 off.

Which seems to have solved the problem. I've set this in my ~/.tmux.conf accordingly.

The entry in tmux.conf should look like this: set -g mouse-utf8 off, with the -g global switch (use the option for all sessions).

| improve this answer | |
  • 2
    +1 Thanks this helped with guake/linux mint/byobu What am I loosing with this setting though? – Karthik T Sep 21 '13 at 9:50
  • 2
    The option does not exist anymore as of tmux v2.2 – saveman71 May 11 '16 at 9:38
  • To elaborate on the comment by @saveman71: UTF8 support is detected automatically from tmux 2.2 on, the problem described by OP should be fixed without having to set mouse-utf8 off. See raw.githubusercontent.com/tmux/tmux/master/CHANGES – Tomas May 30 '16 at 12:41
  • 1
    Still having problems, even with the latest s/w ? Try this answer... askubuntu.com/questions/507214/… – Lqueryvg Dec 3 '16 at 22:51

I found that the problem is with the terminal, and not tmux. Terminals need to support "utf8 mouse", and if they don't this is the symptoms experienced. Switching to putty or uxterm solved the issue for me.

| improve this answer | |

I use Cygwin mintty and found I had to change the Options;

  • Options-->Mouse->Default
  • Click target from Application to Window.

After that I could click inside Tmux>Vim with no funny characters being inserted, and mouse wheel started working again.

| improve this answer | |
  • 1
    I owe you beer. – airstrike May 8 '16 at 2:38

I had the same problem on Mac OS X and iTerm2. I filed it as a bug with the iTerm2 maintainers, but was never able to get a good log file to submit to them. In the end, I just disabled tmux's mouse support with mode-mouse off. Your question leads me to believe that this may be a tmux issue after all. I would file a bug report with tmux and see where that leads.

| improve this answer | |
  • I see.. Thanks for your comment. I have observed the same behavior on gnome-terminal on a RHEL5 machine recently as well. Do you know which version of tmux you used? Perhaps this is an issue with recent versions. The problem has become so obvious that it's actually hard to use tmux now! – Jonatan May 3 '12 at 17:33
  • I don't recall. No earlier than 1.3, could have been as recent as 1.6. – chepner May 3 '12 at 17:41
  • I just ran into the same issue in tmux 1.6 and iTerm2. Only one window was affected, had to close it out and create a new one to fix it. – claytron May 18 '12 at 5:06

I had tried reset command and it did the trick for me. I found this way on apple stackexchange: here and here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.